Instructions to use compute1/Agents-A1-GPTQ-INT4-Sym with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use compute1/Agents-A1-GPTQ-INT4-Sym with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="compute1/Agents-A1-GPTQ-INT4-Sym") 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("compute1/Agents-A1-GPTQ-INT4-Sym") model = AutoModelForMultimodalLM.from_pretrained("compute1/Agents-A1-GPTQ-INT4-Sym", 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 compute1/Agents-A1-GPTQ-INT4-Sym with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "compute1/Agents-A1-GPTQ-INT4-Sym" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "compute1/Agents-A1-GPTQ-INT4-Sym", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/compute1/Agents-A1-GPTQ-INT4-Sym
- SGLang
How to use compute1/Agents-A1-GPTQ-INT4-Sym 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 "compute1/Agents-A1-GPTQ-INT4-Sym" \ --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": "compute1/Agents-A1-GPTQ-INT4-Sym", "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 "compute1/Agents-A1-GPTQ-INT4-Sym" \ --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": "compute1/Agents-A1-GPTQ-INT4-Sym", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use compute1/Agents-A1-GPTQ-INT4-Sym with Docker Model Runner:
docker model run hf.co/compute1/Agents-A1-GPTQ-INT4-Sym
Agents-A1-GPTQ-INT4-Sym
Symmetric INT4 GPTQ quantization of InternScience/Agents-A1, a 35B Mixture-of-Experts agentic model with 256 experts and hybrid Mamba/attention architecture.
Why this quant?
The community AWQ-INT4 release (cyankiwi/Agents-A1-AWQ-INT4) uses asymmetric INT4 quantization via the compressed-tensors format. SGLang's compressed-tensors MoE path only supports symmetric weight-only quantization for the Marlin MoE kernel — the _is_wNa16_group_channel gate in get_moe_scheme() requires symmetric=True. Asymmetric quants fail this check and fall through to the W8A8 detection path, which crashes with AttributeError: 'NoneType' object has no attribute 'num_bits' because input_activations is None in weight-only quantization.
This model was re-quantized with symmetric GPTQ to be Marlin-compatible, matching the format used by the working palmfuture/Qwen3.6-35B-A3B-GPTQ-Int4 model (which uses sym=True, group_size=128).
Quantization Details
| Parameter | Value |
|---|---|
| Base model | InternScience/Agents-A1 (BF16, ~65 GB) |
| Algorithm | AutoRound (sign gradient descent) |
| Recipe | auto-round-best (1000 iterations per block) |
| Export format | GPTQ (auto_gptq) |
| Bits | 4 |
| Group size | 128 |
| Symmetric | true |
| DescAct | false |
| Weight-only | true (W4A16, no activation quantization) |
| Calibration dataset | ultrachat_200k |
| Calibration samples | 512 |
| Sequence length | 2048 |
| Learning rate | 0.001 |
| Tool | AutoRound v0.14.0 |
| Hardware | 4× NVIDIA RTX 3090 (24 GB each) |
| Quantization time | ~18 hours |
| Output size | ~22 GB (6 safetensors shards) |
Ignored layers (kept in BF16/FP16)
These layers are excluded from quantization for quality and Marlin kernel compatibility:
.*attn.*— attention projections (hybrid linear/full attention).*mlp\.gate$— MoE router (must NOT be quantized for Marlin MoE kernel).*shared_expert.*— shared expert MLP.*mtp.*— multi-token prediction head.*visual.*— vision encoder (not needed for text-only serving)lm_head— output projectionmodel.language_model.embed_tokens— token embeddings
Result: 30,720 of 31,181 layers quantized to INT4. All 256 MoE expert projections per layer (gate_proj, up_proj, down_proj × 256 experts × 40 layers) are quantized.
Model Architecture
| Parameter | Value |
|---|---|
| Architecture | Qwen3_5MoeForConditionalGeneration |
| Total parameters | ~35B |
| Active parameters per token | ~3B |
| Hidden size | 2048 |
| Layers | 40 |
| Routed experts | 256 (8 active per token) |
| Shared experts | 1 |
| MoE intermediate size | 512 |
| Max context | 262,144 |
| Vocabulary | 248,320 |
| Attention | Hybrid (full attention every 4th layer, linear/Mamba otherwise) |
| Vision | Built-in vision encoder (ViT depth 27, hidden 1152) |
Deployment
SGLang
python -m sglang.launch_server \
--model-path compute1/Agents-A1-GPTQ-INT4-Sym \
--served-model-name agents-a1 \
--trust-remote-code \
--quantization moe_wna16 \
--tensor-parallel-size 2 \
--context-length 262144 \
--mem-fraction-static 0.87 \
--reasoning-parser qwen3 \
--tool-call-parser qwen3_coder \
--enable-hierarchical-cache \
--enable-mixed-chunk \
--dtype float16 \
--host 0.0.0.0 \
--port 8000
vLLM
vllm serve compute1/Agents-A1-GPTQ-INT4-Sym \
--served-model-name agents-a1 \
--trust-remote-code \
--tensor-parallel-size 2 \
--max-model-len 262144 \
--reasoning-parser qwen3 \
--enable-auto-tool-choice \
--tool-call-parser qwen3_coder
Recommended Sampling Parameters
From the original model card:
temperature: 0.85top_p: 0.95top_k: 20min_p: 0.0presence_penalty: 1.1repetition_penalty: 1.0
VRAM Requirements
Measured on 2× RTX 3090 (24 GB each) with TP=2, --quantization moe_wna16, --mem-fraction-static 0.87, --dtype float16:
| Component | Per-GPU | Notes |
|---|---|---|
| Model weights (INT4 GPTQ) | 10.53 GB | 256 experts × 40 layers, packed int32 |
| KV cache (float16) | 5.02 GB | 525,638 tokens |
| Mamba SSM state | 4.52 GB | conv_state 0.10 GB + ssm_state 4.42 GB |
| CUDA graphs | 0.20 GB | batch sizes [1, 2, 4, 8, 12] |
| Other overhead | 2.99 GB | init + workspace + buffers |
| Total used | ~23.3 GB | |
| Free headroom | ~0.7 GB |
The model fits on 2× RTX 3090 (24 GB each). For additional KV cache headroom, --kv-cache-dtype fp8_e5m2 can be used to double KV token capacity.
Quantization was performed on 4× RTX 3090 with pipeline parallelism, using ~68 GB peak RAM and ~16 GB peak VRAM on the primary GPU.
Acknowledgements
- InternScience for the original Agents-A1 model
- Intel AutoRound team for the quantization toolkit
- Model card adapted from the original model card
License
Apache-2.0, inherited from InternScience/Agents-A1.
- Downloads last month
- 1,208
Model tree for compute1/Agents-A1-GPTQ-INT4-Sym
Base model
InternScience/Agents-A1