Text Generation
Transformers
Safetensors
English
fuse3
mixture-of-experts
MoE
coding
4-bit precision
nf4
bitsandbytes
quantized
LFM2
Qwen
conversational
Instructions to use Akahsizrr/fuse-1-Lite-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Akahsizrr/fuse-1-Lite-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Akahsizrr/fuse-1-Lite-4bit") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Akahsizrr/fuse-1-Lite-4bit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Akahsizrr/fuse-1-Lite-4bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Akahsizrr/fuse-1-Lite-4bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Akahsizrr/fuse-1-Lite-4bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Akahsizrr/fuse-1-Lite-4bit
- SGLang
How to use Akahsizrr/fuse-1-Lite-4bit with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Akahsizrr/fuse-1-Lite-4bit" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Akahsizrr/fuse-1-Lite-4bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Akahsizrr/fuse-1-Lite-4bit" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Akahsizrr/fuse-1-Lite-4bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Akahsizrr/fuse-1-Lite-4bit with Docker Model Runner:
docker model run hf.co/Akahsizrr/fuse-1-Lite-4bit
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
library_name: transformers
|
| 6 |
+
tags:
|
| 7 |
+
- mixture-of-experts
|
| 8 |
+
- MoE
|
| 9 |
+
- coding
|
| 10 |
+
- 4-bit
|
| 11 |
+
- nf4
|
| 12 |
+
- bitsandbytes
|
| 13 |
+
- quantized
|
| 14 |
+
- LFM2
|
| 15 |
+
- Qwen
|
| 16 |
+
base_model:
|
| 17 |
+
- Akahsizrr/fuse-1-Lite
|
| 18 |
+
- LiquidAI/LFM2.5-2.6B
|
| 19 |
+
- Qwen/Qwen3.6-35B-A3B
|
| 20 |
+
pipeline_tag: text-generation
|
| 21 |
+
inference: false
|
| 22 |
+
---
|
| 23 |
+
|
| 24 |
+
# fuse-1 Lite — 4-bit Quantized (NF4)
|
| 25 |
+
|
| 26 |
+
> **4-bit NF4 quantized version of [fuse-1 Lite](https://huggingface.co/Akahsizrr/fuse-1-Lite). 3.36 GB VRAM — runs on T4, RTX 3060, and consumer GPUs.**
|
| 27 |
+
|
| 28 |
+
This is the bitsandbytes 4-bit quantized version of fuse-1 Lite, using NF4 (NormalFloat 4-bit) quantization with double quantization for maximum compression.
|
| 29 |
+
|
| 30 |
+
## Usage
|
| 31 |
+
|
| 32 |
+
```python
|
| 33 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
|
| 34 |
+
import torch
|
| 35 |
+
|
| 36 |
+
bnb_config = BitsAndBytesConfig(
|
| 37 |
+
load_in_4bit=True,
|
| 38 |
+
bnb_4bit_quant_type="nf4",
|
| 39 |
+
bnb_4bit_compute_dtype=torch.bfloat16,
|
| 40 |
+
bnb_4bit_use_double_quant=True,
|
| 41 |
+
)
|
| 42 |
+
|
| 43 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 44 |
+
"Akahsizrr/fuse-1-Lite-4bit",
|
| 45 |
+
quantization_config=bnb_config,
|
| 46 |
+
device_map="auto",
|
| 47 |
+
trust_remote_code=True,
|
| 48 |
+
)
|
| 49 |
+
tokenizer = AutoTokenizer.from_pretrained("Akahsizrr/fuse-1-Lite-4bit")
|
| 50 |
+
|
| 51 |
+
messages = [{"role": "user", "content": "Write a Python function to check if a number is prime."}]
|
| 52 |
+
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 53 |
+
inputs = tokenizer(text, return_tensors="pt").to(model.device)
|
| 54 |
+
|
| 55 |
+
with torch.no_grad():
|
| 56 |
+
outputs = model.generate(**inputs, max_new_tokens=512, do_sample=True, temperature=0.1)
|
| 57 |
+
|
| 58 |
+
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
## VRAM Requirements
|
| 62 |
+
|
| 63 |
+
| Precision | VRAM | GPU |
|
| 64 |
+
|-----------|------|-----|
|
| 65 |
+
| **4-bit (this model)** | **3.36 GB** | T4, RTX 3060, M2 Pro |
|
| 66 |
+
| 8-bit | 6.00 GB | T4, L4, RTX 3060 |
|
| 67 |
+
| bfloat16 | ~12 GB | L4, A10G, RTX 4090 |
|
| 68 |
+
|
| 69 |
+
See the [main model card](https://huggingface.co/Akahsizrr/fuse-1-Lite) for full architecture details, training info, and technical report.
|