Spaces:
Running on Zero
Running on Zero
GitHub Actions commited on
Commit ·
5d6aee7
1
Parent(s): da3ca2c
fix(llm): move trust_remote_code to top-level pipeline param to avoid duplicate arg error
Browse files
hearthnet/services/llm/backends/hf_local.py
CHANGED
|
@@ -127,8 +127,9 @@ class HfLocalBackend:
|
|
| 127 |
device=device,
|
| 128 |
# Disable auto device_map to keep explicit CPU/GPU control
|
| 129 |
# Add trust_remote_code=True for models with custom modeling code (e.g. MiniCPM3-4B)
|
| 130 |
-
model_kwargs={"low_cpu_mem_usage": True
|
| 131 |
-
tokenizer_kwargs={
|
|
|
|
| 132 |
)
|
| 133 |
|
| 134 |
def _build_prompt(self, messages: list[dict]) -> str:
|
|
|
|
| 127 |
device=device,
|
| 128 |
# Disable auto device_map to keep explicit CPU/GPU control
|
| 129 |
# Add trust_remote_code=True for models with custom modeling code (e.g. MiniCPM3-4B)
|
| 130 |
+
model_kwargs={"low_cpu_mem_usage": True},
|
| 131 |
+
tokenizer_kwargs={},
|
| 132 |
+
trust_remote_code=True,
|
| 133 |
)
|
| 134 |
|
| 135 |
def _build_prompt(self, messages: list[dict]) -> str:
|