We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b249146 commit f9a0362Copy full SHA for f9a0362
dsp/modules/hf.py
@@ -61,6 +61,10 @@ def __init__(
61
hf_autoconfig_kwargs = dict(token=token or os.environ.get("HF_TOKEN"))
62
hf_autotokenizer_kwargs = hf_autoconfig_kwargs.copy()
63
hf_automodel_kwargs = hf_autoconfig_kwargs.copy()
64
+
65
+ # silently remove device_map from model_kwargs if it is present, as the option is provided in the constructor
66
+ if "device_map" in model_kwargs:
67
+ model_kwargs.pop("device_map")
68
hf_automodel_kwargs.update(model_kwargs)
69
if not self.is_client:
70
try:
0 commit comments