Instructions to use sahilchachra/Tessera-4B-Preview-AWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sahilchachra/Tessera-4B-Preview-AWQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="sahilchachra/Tessera-4B-Preview-AWQ", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("sahilchachra/Tessera-4B-Preview-AWQ") model = AutoModelForMultimodalLM.from_pretrained("sahilchachra/Tessera-4B-Preview-AWQ", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sahilchachra/Tessera-4B-Preview-AWQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sahilchachra/Tessera-4B-Preview-AWQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sahilchachra/Tessera-4B-Preview-AWQ", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/sahilchachra/Tessera-4B-Preview-AWQ
- SGLang
How to use sahilchachra/Tessera-4B-Preview-AWQ 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 "sahilchachra/Tessera-4B-Preview-AWQ" \ --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": "sahilchachra/Tessera-4B-Preview-AWQ", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "sahilchachra/Tessera-4B-Preview-AWQ" \ --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": "sahilchachra/Tessera-4B-Preview-AWQ", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use sahilchachra/Tessera-4B-Preview-AWQ with Docker Model Runner:
docker model run hf.co/sahilchachra/Tessera-4B-Preview-AWQ
Tessera-4B-Preview — AWQ (W4A16)
4-bit AWQ (activation-aware, weight-only) quantization of sahilchachra/Tessera-4B-Preview, a Qwen3.5-4B reasoning / agentic vision-language model with a <think> reasoning channel and tool / function-calling support.
W4A16 runs well on any modern NVIDIA GPU (Ampere and newer). For Blackwell hardware, the NVFP4 variant uses native FP4 tensor cores.
| Base model | sahilchachra/Tessera-4B-Preview |
| Architecture | qwen3_5 — dense hybrid GatedDeltaNet (linear-attn) + full-attention, 32 text layers (3:1 pattern), 24-layer vision tower, MTP head |
| Scheme | W4A16 — 4-bit integer weights, group size 128, symmetric; BF16 activations |
| Method | llm-compressor AWQ (oneshot) → compressed-tensors |
| Size | ~5.5 GB (from ~9.3 GB BF16) |
| License | CC-BY-NC-4.0 (non-commercial — inherited from base) |
What is quantized
Quantized to 4-bit (the text transformer — where most parameters and latency live):
- full-attention
self_attn.{q,k,v,o}_proj mlp.{gate,up,down}_proj(all 32 text layers)
Kept in BF16 (precision-sensitive or non-Linear): the full vision tower, GatedDeltaNet linear_attn (mamba) mixers, the MTP head, tied token embeddings, lm_head, and all norms. The vision tower is preserved intact — image understanding is unchanged from the base model; only the language model is compressed.
Calibration
Activation-aware scales were computed from 64 sequences × 512 tokens of HuggingFaceH4/ultrachat_200k rendered through the model's own chat template — matching the model's instruction/chat activation distribution.
Verification
- All 128 expected text-tower projections are packed to 4-bit; leak-checked (vision / linear_attn / MTP / embeddings / lm_head / norms confirmed not quantized).
- Loads and generates in vLLM with the vision tower built and the
<think>reasoning channel intact.
Usage (vLLM — recommended)
Text / reasoning:
from vllm import LLM, SamplingParams
llm = LLM(model="sahilchachra/Tessera-4B-Preview-AWQ", trust_remote_code=True)
out = llm.chat(
[{"role": "user", "content": "Plan a 3-step approach to debug a flaky test."}],
SamplingParams(temperature=0.6, top_p=0.95, max_tokens=512),
)
print(out[0].outputs[0].text)
Image + text:
out = llm.chat([{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}},
{"type": "text", "text": "Describe what you see."},
],
}], SamplingParams(temperature=0.6, max_tokens=512))
print(out[0].outputs[0].text)
Serve:
vllm serve sahilchachra/Tessera-4B-Preview-AWQ \
--trust-remote-code --reasoning-parser qwen3
Notes
- vLLM is the recommended runtime for this checkpoint. Some
compressed-tensorsreleases mis-handle packed-weight decompression in plaintransformers; vLLM uses its own loader and is unaffected. - Prompt format, capabilities, benchmarks, training details, and citation follow the base model — see the original model card.
Quantized by sahilchachra with llm-compressor.
- Downloads last month
- 41