Upload nota-ai_Solar-Open-100B-NotaMoEQuant-Int4_1.txt with huggingface_hub
Browse files
nota-ai_Solar-Open-100B-NotaMoEQuant-Int4_1.txt
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
```CODE:
|
| 2 |
+
# Load model directly
|
| 3 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 4 |
+
|
| 5 |
+
tokenizer = AutoTokenizer.from_pretrained("nota-ai/Solar-Open-100B-NotaMoEQuant-Int4", trust_remote_code=True)
|
| 6 |
+
model = AutoModelForCausalLM.from_pretrained("nota-ai/Solar-Open-100B-NotaMoEQuant-Int4", trust_remote_code=True)
|
| 7 |
+
messages = [
|
| 8 |
+
{"role": "user", "content": "Who are you?"},
|
| 9 |
+
]
|
| 10 |
+
inputs = tokenizer.apply_chat_template(
|
| 11 |
+
messages,
|
| 12 |
+
add_generation_prompt=True,
|
| 13 |
+
tokenize=True,
|
| 14 |
+
return_dict=True,
|
| 15 |
+
return_tensors="pt",
|
| 16 |
+
).to(model.device)
|
| 17 |
+
|
| 18 |
+
outputs = model.generate(**inputs, max_new_tokens=40)
|
| 19 |
+
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
|
| 20 |
+
```
|
| 21 |
+
|
| 22 |
+
ERROR:
|
| 23 |
+
Traceback (most recent call last):
|
| 24 |
+
File "/tmp/nota-ai_Solar-Open-100B-NotaMoEQuant-Int4_15SGWbN.py", line 27, in <module>
|
| 25 |
+
model = AutoModelForCausalLM.from_pretrained("nota-ai/Solar-Open-100B-NotaMoEQuant-Int4", trust_remote_code=True)
|
| 26 |
+
File "/tmp/.cache/uv/environments-v2/60c3c1669989868b/lib/python3.13/site-packages/transformers/models/auto/auto_factory.py", line 365, in from_pretrained
|
| 27 |
+
return model_class.from_pretrained(
|
| 28 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
|
| 29 |
+
pretrained_model_name_or_path, *model_args, config=config, **hub_kwargs, **kwargs
|
| 30 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 31 |
+
)
|
| 32 |
+
^
|
| 33 |
+
File "/tmp/.cache/uv/environments-v2/60c3c1669989868b/lib/python3.13/site-packages/transformers/modeling_utils.py", line 4015, in from_pretrained
|
| 34 |
+
hf_quantizer, config, device_map = get_hf_quantizer(
|
| 35 |
+
~~~~~~~~~~~~~~~~^
|
| 36 |
+
config, quantization_config, device_map, weights_only, user_agent
|
| 37 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 38 |
+
)
|
| 39 |
+
^
|
| 40 |
+
File "/tmp/.cache/uv/environments-v2/60c3c1669989868b/lib/python3.13/site-packages/transformers/quantizers/auto.py", line 326, in get_hf_quantizer
|
| 41 |
+
hf_quantizer.validate_environment(
|
| 42 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
|
| 43 |
+
device_map=device_map,
|
| 44 |
+
^^^^^^^^^^^^^^^^^^^^^^
|
| 45 |
+
weights_only=weights_only,
|
| 46 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 47 |
+
)
|
| 48 |
+
^
|
| 49 |
+
File "/tmp/.cache/uv/environments-v2/60c3c1669989868b/lib/python3.13/site-packages/transformers/quantizers/quantizer_auto_round.py", line 43, in validate_environment
|
| 50 |
+
raise ImportError(
|
| 51 |
+
"Loading an AutoRound quantized model requires auto-round library (`pip install 'auto-round>=0.5'`)"
|
| 52 |
+
)
|
| 53 |
+
ImportError: Loading an AutoRound quantized model requires auto-round library (`pip install 'auto-round>=0.5'`)
|