Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,101 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
base_model:
|
| 6 |
+
- LiquidAI/LFM2.5-1.2B-Base
|
| 7 |
+
pipeline_tag: text-classification
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# Open4bits / LFM2.5-1.2B-Base-Quantized
|
| 11 |
+
|
| 12 |
+
This repository provides **multiple quantized variants** of the **LFM 2.5 Base (1.2B parameters)** model for efficient inference and deployment.
|
| 13 |
+
|
| 14 |
+
The **original model** is developed and released by **LiquidAI**:
|
| 15 |
+
|
| 16 |
+
Original model:
|
| 17 |
+
https://huggingface.co/LiquidAI/LFM2.5-1.2B-Base
|
| 18 |
+
|
| 19 |
+
These quantizations are maintained and published by **ArkAiLab** under the **Open4bits** organization to improve accessibility across a wide range of hardware.
|
| 20 |
+
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
## Available Quantization Formats
|
| 24 |
+
|
| 25 |
+
Each format is stored in a **separate directory**:
|
| 26 |
+
|
| 27 |
+
- **FP16** – Baseline half-precision weights
|
| 28 |
+
- **FP8** – High-performance low-precision format (GPU support required)
|
| 29 |
+
- **INT8** – Balanced performance and memory usage (BitsAndBytes)
|
| 30 |
+
- **NF4 (4-bit)** – Maximum compression using BitsAndBytes double quant
|
| 31 |
+
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
## Model Information
|
| 35 |
+
|
| 36 |
+
- **Model Name:** LFM 2.5 Base
|
| 37 |
+
- **Parameters:** ~1.2B
|
| 38 |
+
- **Architecture:** Custom LiquidAI architecture
|
| 39 |
+
- **Original Author:** LiquidAI
|
| 40 |
+
- **Quantized By:** ArkAiLab (Open4bits)
|
| 41 |
+
|
| 42 |
+
This model **requires** `trust_remote_code=True` when loading.
|
| 43 |
+
|
| 44 |
+
---
|
| 45 |
+
|
| 46 |
+
## Quantization Details
|
| 47 |
+
|
| 48 |
+
- Quantized using **PyTorch** and **Hugging Face Transformers**
|
| 49 |
+
- INT8 and NF4 formats use **BitsAndBytes**
|
| 50 |
+
- FP8 provided where hardware support allows
|
| 51 |
+
- No GPTQ, AWQ, or llama.cpp used
|
| 52 |
+
- Safe for **Google Colab** and **Kaggle**
|
| 53 |
+
|
| 54 |
+
---
|
| 55 |
+
|
| 56 |
+
## Usage Example
|
| 57 |
+
|
| 58 |
+
```
|
| 59 |
+
python
|
| 60 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 61 |
+
|
| 62 |
+
model_id = "Open4bits/LFM2.5-1.2B-Base-Quantized"
|
| 63 |
+
|
| 64 |
+
tokenizer = AutoTokenizer.from_pretrained(
|
| 65 |
+
model_id,
|
| 66 |
+
trust_remote_code=True
|
| 67 |
+
)
|
| 68 |
+
|
| 69 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 70 |
+
model_id,
|
| 71 |
+
trust_remote_code=True,
|
| 72 |
+
device_map="auto"
|
| 73 |
+
)
|
| 74 |
+
|
| 75 |
+
inputs = tokenizer("Hello, world!", return_tensors="pt").to(model.device)
|
| 76 |
+
outputs = model.generate(**inputs, max_new_tokens=50)
|
| 77 |
+
|
| 78 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
---
|
| 82 |
+
|
| 83 |
+
## Organization
|
| 84 |
+
|
| 85 |
+
This repository is maintained by **ArkAiLab** under the **Open4bits** initiative.
|
| 86 |
+
|
| 87 |
+
ArkAiLab (Main Organization):
|
| 88 |
+
https://huggingface.co/ArkAiLab
|
| 89 |
+
|
| 90 |
+
Open4bits (Quantization Projects):
|
| 91 |
+
https://huggingface.co/Open4bits
|
| 92 |
+
|
| 93 |
+
## License
|
| 94 |
+
|
| 95 |
+
This repository follows the **same license** as the original LiquidAI model.
|
| 96 |
+
Please refer to the original model repository for full licensing details.
|
| 97 |
+
|
| 98 |
+
## Disclaimer
|
| 99 |
+
|
| 100 |
+
This is an **unofficial quantized release**.
|
| 101 |
+
All credit for the original model architecture and training goes to **LiquidAI**.
|