Spaces:
Configuration error
Configuration error
oremaz commited on
Commit ·
0970940
1
Parent(s): 5d36f6f
Update agent.py
Browse files137 unmodified lines13813914014114214314456 unmodified lines201202203204205206207137 unmodified linesdef __init__(self, **kwargs):super().__init__(**kwargs)self._model = Qwen2_5_VLForConditionalGeneration.from_pretrained(self.model_name, torch_dtype=torch.bfloat16, device_map=0)self._processor = AutoProcessor.from_pretrained(self.model_name)56 unmodified linescode_llm = HuggingFaceLLM(model_name="Qwen/Qwen2.5-Coder-3B-Instruct",tokenizer_name="Qwen/Qwen2.5-Coder-3B-Instruct",device_map="cuda:1",model_kwargs={"torch_dtype": "auto"},generate_kwargs={"do_sample": False})137 unmodified lines13813914014114214314456 unmodified lines201202203204205206207137 unmodified linesdef __init__(self, **kwargs):super().__init__(**kwargs)self._model = Qwen2_5_VLForConditionalGeneration.from_pretrained(self.model_name, torch_dtype=torch.bfloat16, device_map='balanced')self._processor = AutoProcessor.from_pretrained(self.model_name)56 unmodified linescode_llm = HuggingFaceLLM(model_name="Qwen/Qwen2.5-Coder-3B-Instruct",tokenizer_name="Qwen/Qwen2.5-Coder-3B-Instruct",device_map="cuda:0",model_kwargs={"torch_dtype": "auto"},generate_kwargs={"do_sample": False})
agent.py+2-2