Spaces:
Running
Running
Adding readme
Browse files
README.md
CHANGED
|
@@ -6,5 +6,45 @@ colorTo: blue
|
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
-
Edit this `README.md` markdown file to author your organization card.
|
|
|
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
+
<h1 style="line-height: 50px;"> Spectra Suite
|
| 10 |
+
|
| 11 |
+
We release the Spectra Suite consisting of 54 models ranging from 99M to 3.9B parameters across different bitwidths:
|
| 12 |
+
|
| 13 |
+
FloatLM: LLMs pretrained in FP16 (Half-Precision).
|
| 14 |
+
TriLM: LLMs pretrained with effective ternary bitwidth.
|
| 15 |
+
QuantLM 8-bit: FloatLM LLMs Quantized to 8-bits.
|
| 16 |
+
QuantLM 6-bit: FloatLM LLMs Quantized to 6-bits.
|
| 17 |
+
QuantLM 4-bit: FloatLM LLMs Quantized to 4-bits.
|
| 18 |
+
QuantLM 3-bit: FloatLM LLMs Quantized to 3-bits.
|
| 19 |
+
All models are released in unpacked (FP16 format) - compatible with FP16 GEMMs across any library supporting the LLaMa architecture.
|
| 20 |
+
|
| 21 |
+
## Usage:
|
| 22 |
+
|
| 23 |
+
```python
|
| 24 |
+
import transformers as tf, torch
|
| 25 |
+
|
| 26 |
+
# Please select the model you wish to run.
|
| 27 |
+
model_name = "SpectraSuite/TriLM_3.9B_Unpacked"
|
| 28 |
+
|
| 29 |
+
# Please adjust the temperature, repetition penalty, top_k, top_p and other sampling parameters according to your needs.
|
| 30 |
+
pipeline = tf.pipeline("text-generation", model=model_id, model_kwargs={"torch_dtype": torch.float16}, device_map="auto")
|
| 31 |
+
|
| 32 |
+
# These are base (pretrained) LLMs that are not instruction and chat tuned. You may need to adjust your prompt accordingly.
|
| 33 |
+
pipeline("Once upon a time")
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
## Citation
|
| 37 |
+
If you find these models or the associated paper useful, please cite the paper:
|
| 38 |
+
|
| 39 |
+
```bibtex
|
| 40 |
+
@misc{kaushal2024spectracomprehensivestudyternary,
|
| 41 |
+
title={Spectra: A Comprehensive Study of Ternary, Quantized, and FP16 Language Models},
|
| 42 |
+
author={Ayush Kaushal and Tejas Pandey and Tejas Vaidhya and Aaryan Bhagat and Irina Rish},
|
| 43 |
+
year={2024},
|
| 44 |
+
eprint={2407.12327},
|
| 45 |
+
archivePrefix={arXiv},
|
| 46 |
+
primaryClass={cs.LG},
|
| 47 |
+
url={https://arxiv.org/abs/2407.12327},
|
| 48 |
+
}
|
| 49 |
+
```
|
| 50 |
|
|
|