Skip to content

Commit a48ce9a

Browse files
committed
fix: trust-remote-code
1 parent ac3192f commit a48ce9a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

repoqa/provider/hf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414

1515
class HfProvider(BaseProvider):
1616
def __init__(self, model, trust_remote_code=False, attn_implementation=None):
17-
self.tokenizer = AutoTokenizer.from_pretrained(model)
17+
self.tokenizer = AutoTokenizer.from_pretrained(
18+
model, trust_remote_code=trust_remote_code
19+
)
1820
self.hf_model = AutoModelForCausalLM.from_pretrained(
1921
model,
2022
trust_remote_code=trust_remote_code,

repoqa/provider/vllm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ class VllmProvider(BaseProvider):
1515
def __init__(
1616
self, model, tensor_parallel_size, max_model_len=None, trust_remote_code=False
1717
):
18-
self.tokenizer = AutoTokenizer.from_pretrained(model)
18+
self.tokenizer = AutoTokenizer.from_pretrained(
19+
model, trust_remote_code=trust_remote_code
20+
)
1921
self.llm = LLM(
2022
model=model,
2123
tensor_parallel_size=tensor_parallel_size,

0 commit comments

Comments
 (0)