Text Generation
Transformers
Safetensors
qwen2
fp8
vllm
compressed-tensors
quantized
llmcompressor
conversational
text-generation-inference
Instructions to use sh0ck0r/calme-3.2-78b-instruct-FP8-Dynamic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sh0ck0r/calme-3.2-78b-instruct-FP8-Dynamic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sh0ck0r/calme-3.2-78b-instruct-FP8-Dynamic") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sh0ck0r/calme-3.2-78b-instruct-FP8-Dynamic") model = AutoModelForCausalLM.from_pretrained("sh0ck0r/calme-3.2-78b-instruct-FP8-Dynamic", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sh0ck0r/calme-3.2-78b-instruct-FP8-Dynamic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sh0ck0r/calme-3.2-78b-instruct-FP8-Dynamic" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sh0ck0r/calme-3.2-78b-instruct-FP8-Dynamic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sh0ck0r/calme-3.2-78b-instruct-FP8-Dynamic
- SGLang
How to use sh0ck0r/calme-3.2-78b-instruct-FP8-Dynamic 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 "sh0ck0r/calme-3.2-78b-instruct-FP8-Dynamic" \ --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": "sh0ck0r/calme-3.2-78b-instruct-FP8-Dynamic", "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 "sh0ck0r/calme-3.2-78b-instruct-FP8-Dynamic" \ --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": "sh0ck0r/calme-3.2-78b-instruct-FP8-Dynamic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use sh0ck0r/calme-3.2-78b-instruct-FP8-Dynamic with Docker Model Runner:
docker model run hf.co/sh0ck0r/calme-3.2-78b-instruct-FP8-Dynamic
File size: 3,712 Bytes
866d18c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | ---
base_model: MaziyarPanahi/calme-3.2-instruct-78b
tags:
- fp8
- vllm
- compressed-tensors
- quantized
- llmcompressor
license: apache-2.0
inference:
parameters:
temperature: 0.7
top_p: 0.9
max_new_tokens: 2048
library_name: transformers
pipeline_tag: text-generation
---
# calme-3.2-instruct-78b - FP8 Dynamic Quantization
This is an FP8 quantized version of [MaziyarPanahi/calme-3.2-instruct-78b](https://huggingface.co/MaziyarPanahi/calme-3.2-instruct-78b) using `llmcompressor` with the FP8_DYNAMIC scheme.
## Model Details
- **Base Model**: MaziyarPanahi/calme-3.2-instruct-78b
- **Quantization**: FP8_DYNAMIC (W8A8)
- **Format**: compressed-tensors (SafeTensors)
- **Memory**: ~50% of original BF16 size
- **Quality**: <1-2% degradation on benchmarks (typical)
## Quick Start
### vLLM (Recommended)
```bash
pip install vllm
# Serve the model
vllm serve REPO_ID \
--max-model-len 32768 \
--gpu-memory-utilization 0.95
# Python API
from vllm import LLM
llm = LLM(model="REPO_ID")
outputs = llm.generate("Hello, how are you?")
print(outputs[0].outputs[0].text)
```
### Transformers
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained(
"REPO_ID",
device_map="auto",
torch_dtype="auto"
)
tokenizer = AutoTokenizer.from_pretrained("REPO_ID")
messages = [{'role': 'user', 'content': 'Hello!'}]
inputs = tokenizer.apply_chat_template(messages, return_tensors='pt').to(model.device)
outputs = model.generate(inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0]))
```
## Quantization Details
This model was quantized using:
- **Tool**: [llmcompressor](https://github.com/vllm-project/llm-compressor)
- **Method**: FP8_DYNAMIC (Round-to-Nearest)
- **Targets**: All Linear layers except `lm_head`
- **Scheme**: W8A8 (8-bit weights and activations)
## Performance
### Memory Usage
- **Original BF16**: ~2× size of FP8
- **FP8 Quantized**: ~50% of original
- **Savings**: ~50% VRAM reduction
### Inference Speed
- Expect 1.3-1.8× faster inference vs BF16
- 2× higher throughput (more KV cache available)
## Use Cases
Perfect for:
- ✅ Production inference on limited VRAM
- ✅ Running larger models on single GPU
- ✅ Cost-effective API serving
- ✅ High-throughput applications
- ✅ Extended context lengths (more KV cache)
## Hardware Requirements
**Minimum VRAM** (approximate):
- 70B model: ~40 GB (RTX A6000, A100 40GB)
- 123B model: ~70 GB (A100 80GB, H100, H200)
**Recommended**:
- H100/H200 for best performance
- vLLM for optimized serving
- Enable FP8 KV cache for extended context
## Important Notes
⚠️ **Quantization Trade-offs**:
- Slight quality degradation (typically <1-2%)
- Not suitable for fine-tuning (inference only)
- Best with vLLM (has FP8 kernel optimizations)
✅ **Best Practices**:
- Use `--kv-cache-dtype fp8` for longer contexts
- Set `--gpu-memory-utilization 0.90-0.95`
- Add `--enforce-eager` if you encounter compilation issues
## Citation
If you use this model, please cite:
```bibtex
@misc{model_name-fp8,
author = {author},
title = {model_name FP8 Dynamic Quantization},
year = {2025},
publisher = {HuggingFace},
url = {https://huggingface.co/repo_id}
}
```
## License
Inherits license from base model: [MaziyarPanahi/calme-3.2-instruct-78b](https://huggingface.co/MaziyarPanahi/calme-3.2-instruct-78b)
## Acknowledgments
- Base model by [MaziyarPanahi](https://huggingface.co/MaziyarPanahi)
- Quantization via [llmcompressor](https://github.com/vllm-project/llm-compressor)
- Serving optimized for [vLLM](https://github.com/vllm-project/vllm)
---
**Want more FP8 models?** Check out my other quantizations!
|