Instructions to use chris320211/smoothquant-granite33-2b-g52xlarge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use chris320211/smoothquant-granite33-2b-g52xlarge with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="chris320211/smoothquant-granite33-2b-g52xlarge") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("chris320211/smoothquant-granite33-2b-g52xlarge") model = AutoModelForCausalLM.from_pretrained("chris320211/smoothquant-granite33-2b-g52xlarge", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use chris320211/smoothquant-granite33-2b-g52xlarge with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "chris320211/smoothquant-granite33-2b-g52xlarge" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chris320211/smoothquant-granite33-2b-g52xlarge", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/chris320211/smoothquant-granite33-2b-g52xlarge
- SGLang
How to use chris320211/smoothquant-granite33-2b-g52xlarge 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 "chris320211/smoothquant-granite33-2b-g52xlarge" \ --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": "chris320211/smoothquant-granite33-2b-g52xlarge", "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 "chris320211/smoothquant-granite33-2b-g52xlarge" \ --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": "chris320211/smoothquant-granite33-2b-g52xlarge", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use chris320211/smoothquant-granite33-2b-g52xlarge with Docker Model Runner:
docker model run hf.co/chris320211/smoothquant-granite33-2b-g52xlarge
SmoothQuant ibm-granite/granite-3.3-2b-instruct
Quantized derivative of ibm-granite/granite-3.3-2b-instruct.
Not Hub fp16. Weights are the packed/runtime artifact from job 20260920T012426Z-d2f5c6.
WikiText-2 (test, 2048-token windows, 65504 tokens)
Measured on NVIDIA A10G (g5.2xlarge) against the original fp16 snapshot.
Numbers copied from jobs/20260920T012426Z-d2f5c6/benchmark.json.
| Quantized | fp16 snapshot | |
|---|---|---|
| Perplexity | 7.762474 | 7.715887 |
| NLL loss | 2.049301 | 2.043281 |
| Tokens/s (2048 prefill, after warmup) | 9501.7 | 7184.6 |
| Peak VRAM (GB) | 3.377 | 5.641 |
ppl_ratio: 1.006038 (quality_ok=True)improved_throughput: Trueimproved_vram: True
Pull
from huggingface_hub import snapshot_download
path = snapshot_download("chris320211/smoothquant-granite33-2b-g52xlarge")
This is not a drop-in AutoModelForCausalLM.from_pretrained checkpoint.
Reload with the included quant_agent_inference_adapter.py after the method
repo (and overlay, if any) is on QUANT_AGENT_METHOD_REPO. See
quantization_config.json.
License
Base model license (MIT for Phi-3) plus the method repository license.
Keep LICENSE / NOTICE.md from the snapshot when present.
- Downloads last month
- 297
Model tree for chris320211/smoothquant-granite33-2b-g52xlarge
Base model
ibm-granite/granite-3.3-2b-base