Downloads · 30 days
18
24% of all-time downloads
robotflowlabs/qwen2.5-7b-instruct-int4
qwen2.5-7b-instruct-int4 is a text generation model from robotflowlabs. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Alibaba's Qwen2.5-7B-Instruct quantized to 4-bit NF4 with double quantization for robotic reasoning and planning. 2.7x smaller — from 14.5 GB to 5.3 GB — while preserving instruction-following and reasoning capabilities.
Downloads · 30 days
18
24% of all-time downloads
All-time downloads
75
Public
Parameters
7.8B
5.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors5.5 GB · 100%
How the weights are stored.
U86.7B · 86%
From the Hugging Face model README
Alibaba's Qwen2.5-7B-Instruct quantized to 4-bit NF4 with double quantization for robotic reasoning and planning. 2.7x smaller — from 14.5 GB to 5.3 GB — while preserving instruction-following and reasoning capabilities.
This model is part of the RobotFlowLabs model library, built for the ANIMA agentic robotics platform — a modular ROS2-native AI system that brings foundation model intelligence to real robots operating in the real world.
Robots need to reason about instructions, plan multi-step tasks, and generate structured outputs — all in real-time on edge hardware. Qwen2.5-7B is one of the strongest open-source instruction-following models at this scale, with excellent performance on reasoning, coding, and structured output generation. At 14.5 GB it's too large for edge GPUs. INT4 NF4 double quantization brings it to 5.3 GB — fitting on a single L4 24GB alongside vision models.
| Property | Value |
|---|---|
| Architecture | Qwen2 (decoder-only transformer) |
| Parameters | 7B |
| Hidden Dimension | 3584 |
| Layers | 28 |
| Attention Heads | 28 (4 KV heads, GQA) |
| MLP Dimension | 18944 (SiLU activation) |
| Context Length | 32,768 tokens |
| Vocabulary | 152,064 tokens |
| RoPE | θ = 1,000,000 |
| Quantization | NF4 double quantization (bitsandbytes) |
| Original Model | Qwen/Qwen2.5-7B-Instruct |
| License | Apache-2.0 |
Quantized on an NVIDIA L4 24GB GPU using bitsandbytes NF4 with double quantization.
| Metric | Original | INT4 Quantized | Change |
|---|---|---|---|
| Total Size | 14,537 MB | 5,301 MB | 2.7x smaller |
| Quantization | BF16 | NF4 + double quant | 4-bit weights |
| Compute Dtype | BF16 | BF16 | Preserved at inference |
| Format | SafeTensors | SafeTensors | Direct HF loading |
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"robotflowlabs/qwen2.5-7b-instruct-int4",
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("robotflowlabs/qwen2.5-7b-instruct-int4")
messages = [
{"role": "system", "content": "You are a robotic task planner."},
{"role": "user", "content": "Plan the steps to pick up the red cup and place it on the shelf."}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
from forge.language import LanguageModelRegistry
planner = LanguageModelRegistry.load("qwen2.5-7b-instruct-int4")
plan = planner.generate("Pick up the red cup and place it on the shelf")
Qwen2.5-7B serves as the reasoning backbone in ANIMA:
ANIMA is a modular, ROS2-native agentic robotics platform developed by RobotFlowLabs. It combines 58 specialized AI modules into a unified system for real-world robotic autonomy.
Original Qwen2.5-7B-Instruct (BF16, 14.5 GB)
│
└─→ bitsandbytes NF4 double quantization
├─→ bnb_4bit_quant_type: nf4
├─→ bnb_4bit_use_double_quant: true
├─→ bnb_4bit_compute_dtype: bfloat16
└─→ model.safetensors (5.3 GB)
Qwen/Qwen2.5-7B-Instruct by Alibaba Cloud@article{qwen2.5,
title={Qwen2.5 Technical Report},
author={Qwen Team},
journal={arXiv preprint arXiv:2412.15115},
year={2024}
}