Skip to content

Commit dd4280c

Browse files
YunchaoYangyunchaoyang1 user
authored andcommitted
[qwen3.5] Fix integration test: use local checkpoint, add trust_remote_code
- Use local checkpoint path when available to avoid SSL proxy issues - Add trust_remote_code=True for Qwen 3.5 tokenizer and model loading - Fix torch_dtype parameter (was renamed from dtype in newer transformers)
1 parent 3c9e1ed commit dd4280c

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

tests/integration/models/test_qwen35.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
import torch
99
import torch.nn.functional as F
1010

11-
MODEL_ID = "Qwen/Qwen3.5-0.8B"
11+
import os
12+
13+
# Use local checkpoint if available (avoids SSL/proxy issues in CI)
14+
_LOCAL_PATH = "/checkpoint/smallomnillm/shared/models/Qwen3.5-0.8B"
15+
MODEL_ID = _LOCAL_PATH if os.path.isdir(_LOCAL_PATH) else "Qwen/Qwen3.5-0.8B"
1216

1317

1418
def _hf_model_type_available(model_type: str) -> bool:
@@ -36,10 +40,11 @@ def test_logit_parity(self) -> None:
3640
print("Step 1: Loading HuggingFace model...")
3741
print("=" * 60)
3842

39-
hf_tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
43+
hf_tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True)
4044
hf_model = AutoModelForCausalLM.from_pretrained(
4145
MODEL_ID,
42-
dtype=torch.float32,
46+
torch_dtype=torch.float32,
47+
trust_remote_code=True,
4348
)
4449
hf_model.eval()
4550
print(

0 commit comments

Comments
 (0)