Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model:
|
4 |
+
- openai/gpt-oss-120b
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
|
9 |
+
|
10 |
+
---
|
11 |
+
|
12 |
+
|
13 |
+
## Model Details
|
14 |
+
|
15 |
+
This model is a mixed int4 model with group_size 128 and symmetric quantization of [openai/gpt-oss-120b](https://huggingface.co/openai/gpt-oss-120b) generated by [intel/auto-round](https://github.com/intel/auto-round) via **RTN** (no algorithm tuning). following the official model, Non expert layers fallback to 16bits
|
16 |
+
|
17 |
+
## How To Use
|
18 |
+
|
19 |
+
**this model could not run on vLLM**
|
20 |
+
|
21 |
+
|
22 |
+
|
23 |
+
**INT4 Inference on CPU/Intel GPU/CUDA**
|
24 |
+
|
25 |
+
~~~python
|
26 |
+
from transformers import pipeline
|
27 |
+
|
28 |
+
model_id ="Intel/gpt-oss-120b-int4-rtn-AutoRound"
|
29 |
+
|
30 |
+
pipe = pipeline(
|
31 |
+
"text-generation",
|
32 |
+
model=model_id,
|
33 |
+
torch_dtype="auto",
|
34 |
+
device_map="auto",
|
35 |
+
trust_remote_code=True
|
36 |
+
)
|
37 |
+
|
38 |
+
messages = [
|
39 |
+
{"role": "user", "content": "Explain quantum mechanics clearly and concisely."},
|
40 |
+
]
|
41 |
+
|
42 |
+
outputs = pipe(
|
43 |
+
messages,
|
44 |
+
max_new_tokens=512,
|
45 |
+
)
|
46 |
+
print(outputs[0]["generated_text"][-1])
|
47 |
+
|
48 |
+
"""
|
49 |
+
{'role': 'assistant', 'content': 'analysisWe need to explain quantum mechanics clearly and concisely. Should be accessible, maybe a few paragraphs, covering wave-particle duality, super'}
|
50 |
+
|
51 |
+
""
|
52 |
+
|
53 |
+
~~~
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
## Ethical Considerations and Limitations
|
58 |
+
|
59 |
+
The model can produce factually incorrect output, and should not be relied on to produce factually accurate information. Because of the limitations of the pretrained model and the finetuning datasets, it is possible that this model could generate lewd, biased or otherwise offensive outputs.
|
60 |
+
|
61 |
+
Therefore, before deploying any applications of the model, developers should perform safety testing.
|
62 |
+
|
63 |
+
## Caveats and Recommendations
|
64 |
+
|
65 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.
|
66 |
+
|
67 |
+
Here are a couple of useful links to learn more about Intel's AI software:
|
68 |
+
|
69 |
+
- Intel Neural Compressor [link](https://github.com/intel/neural-compressor)
|
70 |
+
|
71 |
+
## Disclaimer
|
72 |
+
|
73 |
+
The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please consult an attorney before using this model for commercial purposes.
|
74 |
+
|
75 |
+
## Cite
|
76 |
+
|
77 |
+
@article{cheng2023optimize, title={Optimize weight rounding via signed gradient descent for the quantization of llms}, author={Cheng, Wenhua and Zhang, Weiwei and Shen, Haihao and Cai, Yiyang and He, Xin and Lv, Kaokao and Liu, Yi}, journal={arXiv preprint arXiv:2309.05516}, year={2023} }
|
78 |
+
|
79 |
+
[arxiv](https://arxiv.org/abs/2309.05516) [github](https://github.com/intel/auto-round)
|