@@ -20,11 +20,20 @@ def _resolve_repo(repo_id: str, repo_type: str = "dataset") -> Path:
2020 try :
2121 return Path (
2222 snapshot_download (
23- repo_id = repo_id , repo_type = repo_type , local_files_only = True
23+ repo_id = repo_id ,
24+ repo_type = repo_type ,
25+ local_files_only = True ,
26+ allow_patterns = ["*.arrow" , "*.json" , "*.pt" , "hidden_states/*" ],
2427 )
2528 )
2629 except LocalEntryNotFoundError :
27- return Path (snapshot_download (repo_id = repo_id , repo_type = repo_type ))
30+ return Path (
31+ snapshot_download (
32+ repo_id = repo_id ,
33+ repo_type = repo_type ,
34+ allow_patterns = ["*.arrow" , "*.json" , "*.pt" , "hidden_states/*" ],
35+ )
36+ )
2837
2938
3039@requires_cadence ("weekly" )
@@ -41,7 +50,7 @@ def test_eagle3_qwen3_8b_sharegpt(tmp_path: Path, prompts: list[list[dict[str, s
4150 seq_length = 8192 ,
4251 epochs = epochs ,
4352 lr = 3e-4 ,
44- draft_vocab_size = 8192 ,
53+ draft_vocab_size = 32000 ,
4554 online = False ,
4655 log_freq = 50 ,
4756 timeout = 30 * 60 , # 30 mins
@@ -71,7 +80,7 @@ def test_dflash_qwen3_8b_sharegpt(tmp_path: Path, prompts: list[list[dict[str, s
7180 seq_length = 8192 ,
7281 epochs = epochs ,
7382 lr = 3e-4 ,
74- draft_vocab_size = 8192 ,
83+ draft_vocab_size = 32000 ,
7584 num_layers = 3 ,
7685 online = False ,
7786 log_freq = 50 ,
@@ -86,3 +95,39 @@ def test_dflash_qwen3_8b_sharegpt(tmp_path: Path, prompts: list[list[dict[str, s
8695 prompts = prompts ,
8796 acceptance_thresholds = [0.30 , 0.05 , 0.001 , 0 , 0 , 0 , 0 ],
8897 )
98+
99+
100+ @requires_cadence ("weekly" )
101+ @pytest .mark .regression
102+ def test_peagle_qwen3_8b_sharegpt (tmp_path : Path , prompts : list [list [dict [str , str ]]]):
103+ save_path = tmp_path / "checkpoints"
104+ hidden_states_dir = _resolve_repo ("inference-optimization/Qwen3-8b-sharegpt-5k" )
105+ epochs = 5
106+ run_training (
107+ model = "Qwen/Qwen3-8B" ,
108+ speculator_type = "peagle" ,
109+ data_path = hidden_states_dir ,
110+ save_path = save_path ,
111+ seq_length = 8192 ,
112+ epochs = epochs ,
113+ lr = 6e-4 ,
114+ draft_vocab_size = 32000 ,
115+ num_layers = 4 ,
116+ online = False ,
117+ log_freq = 50 ,
118+ timeout = 30 * 60 , # 30 mins
119+ extra_train_args = [
120+ "--no-norm-before-residual" ,
121+ "--scheduler-type" ,
122+ "cosine" ,
123+ ],
124+ )
125+ final_checkpoint = str (save_path / str (epochs - 1 ))
126+ run_vllm_engine (
127+ model_path = final_checkpoint ,
128+ tmp_path = tmp_path ,
129+ max_tokens = 512 ,
130+ ignore_eos = True ,
131+ prompts = prompts ,
132+ acceptance_thresholds = [0.45 , 0.1 , 0.01 ],
133+ )
0 commit comments