Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/equiv_chunk_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ def build_cfg(n_chunks):
[None, test_helpers.get_test_config_path()],
run_name=f"equiv_chunk_{n_chunks}",
enable_checkpointing=False,
model_name="mixtral-8x7b",
model_name="qwen3-30b-a3b",
override_model_config=True,
num_experts=8,
num_experts_per_tok=2,
base_emb_dim=2048,
base_mlp_dim=256,
base_moe_mlp_dim=256,
Expand Down
4 changes: 2 additions & 2 deletions tests/inference/benchmark_offline_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ def init_pyconfig(**kwargs):
"max_target_length": 256,
"return_log_prob": True, # <=== set this to True
# Model
"model_name": "gemma2-2b",
"model_name": "gemma3-4b",
"attention": "dot_product",
"allow_split_physical_axes": True,
"scan_layers": False,
# Checkpoints
"tokenizer_type": "huggingface",
"tokenizer_path": "google/gemma-2-2b-it",
"tokenizer_path": "google/gemma-3-4b-it",
"hf_path": "trl-lib/tldr",
# "load_parameters_path": "gs://inference-benchmarks/models/llama2-70b-chat/quant/int8_",
"enable_single_controller": True, # for pathways
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/diloco_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def test_diloco_two_slices(self):
"ici_fsdp_parallelism=-1",
"dcn_diloco_parallelism=2",
"enable_diloco=true",
"model_name=gemma2-2b",
"model_name=qwen3-0.6b",
"override_model_config=True",
"base_emb_dim=32",
"base_num_decoder_layers=1",
Expand Down Expand Up @@ -360,7 +360,7 @@ def test_streaming_diloco_two_slices(self):
"enable_diloco=true",
"enable_streaming_diloco=true",
"num_diloco_fragments=2",
"model_name=gemma2-2b",
"model_name=qwen3-0.6b",
"override_model_config=True",
"base_emb_dim=32",
"base_num_decoder_layers=2",
Expand Down Expand Up @@ -389,7 +389,7 @@ def test_streaming_diloco_two_slices_bucketized(self):
"enable_streaming_diloco=true",
"num_diloco_fragments=3",
"diloco_bucketize_non_scanned=true",
"model_name=gemma2-2b",
"model_name=qwen3-0.6b",
"override_model_config=True",
"base_emb_dim=32",
"base_num_decoder_layers=2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ def init_pyconfig(self, config_file, **kwargs):
"dataset_type": "hf",
"hf_path": "trl-lib/tldr",
"tokenizer_type": "huggingface",
"tokenizer_path": "google/gemma-2-2b-it",
"tokenizer_path": "google/gemma-3-4b-it",
"attention": "dot_product",
"model_name": "gemma2-2b",
"model_name": "gemma3-4b",
} | kwargs
config = pyconfig.initialize(
[
Expand Down
2 changes: 1 addition & 1 deletion tests/post_training/unit/lora_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"base_num_kv_heads": 2,
"base_mlp_dim": 256,
"max_prefill_predict_length": 4,
"model_name": "llama2-7b",
"model_name": "llama3.1-8b",
"override_model_config": True,
"weight_dtype": "bfloat16",
}
Expand Down
2 changes: 1 addition & 1 deletion tests/post_training/unit/rl_lr_schedule_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"base_num_kv_heads": 2,
"base_mlp_dim": 256,
"max_prefill_predict_length": 4,
"model_name": "llama2-7b",
"model_name": "llama3.1-8b",
"override_model_config": True,
"weight_dtype": "bfloat16",
}
Expand Down
13 changes: 11 additions & 2 deletions tests/unit/aqt_serve_roundtrip_nnx_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,23 @@ class ServeModeRoundTripTest(unittest.TestCase):

def _init_cfg(self, ckpt_path, *, checkpoint_is_quantized):
"""Build a pyconfig for save or reload."""
# Use base.yml + gpt3-52k. The decoupled test config strips
# Use base.yml + qwen3-0.6b with small dimensions. The decoupled test config strips
# logical_axis_rules (e.g. "norm"), which the AQT serve-mode model
# construction needs.
base_yml = os.path.join(MAXTEXT_PKG_DIR, "configs", "base.yml")
args = [
sys.argv[0],
base_yml,
"model_name=gpt3-52k",
"model_name=qwen3-0.6b",
"override_model_config=true",
"base_emb_dim=16",
"base_num_query_heads=2",
"base_num_kv_heads=2",
"base_mlp_dim=64",
"base_num_decoder_layers=1",
"head_dim=8",
"vocab_size=1024",
"attention=dot_product",
"max_target_length=64",
"max_prefill_predict_length=16",
"per_device_batch_size=1",
Expand Down
14 changes: 7 additions & 7 deletions tests/unit/configs_value_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ def test_type_conversion(self):

def test_model_override(self):
"""Tests that model-specific configs override base.yml."""
argv = ["", _BASE_CONFIG_PATH, "model_name=llama2-7b", "run_name=test"]
argv = ["", _BASE_CONFIG_PATH, "model_name=llama3.1-8b", "run_name=test"]
config = pyconfig.initialize(argv)
self.assertEqual(config.base_emb_dim, 4096) # From llama2-7b.yml
self.assertEqual(config.base_num_decoder_layers, 32) # From llama2-7b.yml
self.assertEqual(config.decoder_block, types.DecoderBlockType.LLAMA2) # from llama2-7b.yml
self.assertEqual(config.base_emb_dim, 4096) # From llama3.1-8b.yml
self.assertEqual(config.base_num_decoder_layers, 32) # From llama3.1-8b.yml
self.assertEqual(config.decoder_block, types.DecoderBlockType.LLAMA2) # from llama3.1-8b.yml
self.assertEqual(config.steps, 150001) # From base.yml, not overridden

def test_derived_values(self):
Expand Down Expand Up @@ -1251,7 +1251,7 @@ def test_llama3_tokenizer_correction(self):
argv = [
"",
_BASE_CONFIG_PATH,
"model_name=llama3-8b",
"model_name=llama3.1-8b",
"tokenizer_path=assets/tokenizer_llama3.tiktoken",
"run_name=test",
]
Expand Down Expand Up @@ -1841,10 +1841,10 @@ def test_rl_config_sa_context_split_requires_custom_remat(self):
"base_num_kv_heads": 2,
"base_mlp_dim": 256,
"max_prefill_predict_length": 4,
"model_name": "llama2-7b",
"model_name": "llama3.1-8b",
"override_model_config": True,
"weight_dtype": "bfloat16",
"tokenizer_path": "meta-llama/Llama-2-7b",
"tokenizer_path": "meta-llama/Llama-3.1-8B",
}

def rl_config(*cli_args):
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/decoder_layer_model_mode_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
}

_DEEPSEEK = {
"model_name": "deepseek2-16b",
"model_name": "deepseek3-test",
"override_model_config": True,
"mla_naive_kvcache": False,
"first_num_dense_layers": 1,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/deepseek_decode_consistency_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
}

_DEEPSEEK = {
"model_name": "deepseek2-16b",
"model_name": "deepseek3-test",
"override_model_config": True,
"num_experts": 4,
"num_experts_per_tok": 2,
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/defer_small_all_reduces_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,10 @@ def run(defer, chunks, rbf):
[None, get_test_config_path()],
run_name="defer_small_ar_layer",
enable_checkpointing=False,
model_name="mixtral-8x7b",
model_name="qwen3-30b-a3b",
override_model_config=True,
num_experts=8,
num_experts_per_tok=2,
base_emb_dim=256,
base_mlp_dim=128,
base_moe_mlp_dim=128,
Expand Down
Loading
Loading