Data Agent
Collection
16 items • Updated
How to use AdithyaSK/data-agent-2b-normal-final with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="AdithyaSK/data-agent-2b-normal-final")
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("AdithyaSK/data-agent-2b-normal-final")
model = AutoModelForMultimodalLM.from_pretrained("AdithyaSK/data-agent-2b-normal-final", 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]:]))How to use AdithyaSK/data-agent-2b-normal-final with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "AdithyaSK/data-agent-2b-normal-final"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "AdithyaSK/data-agent-2b-normal-final",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/AdithyaSK/data-agent-2b-normal-final
How to use AdithyaSK/data-agent-2b-normal-final with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "AdithyaSK/data-agent-2b-normal-final" \
--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": "AdithyaSK/data-agent-2b-normal-final",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "AdithyaSK/data-agent-2b-normal-final" \
--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": "AdithyaSK/data-agent-2b-normal-final",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use AdithyaSK/data-agent-2b-normal-final with Docker Model Runner:
docker model run hf.co/AdithyaSK/data-agent-2b-normal-final
A 2B data-science agent finetuned from Qwen/Qwen3.5-2B with
GRPO (online RL) to solve data-analysis tasks in a sandboxed bash environment. This repo holds
the final checkpoint (end of a full 1-epoch run) of the 2b-normal run.
bash tool, answer submitted to /workdir/answer.txt.AdithyaSK/data_agent_rl_environment_train.Agentic pass@k on the held-out data_agent_rl_environment_eval suite (366 tasks, 4 samples/task, unbiased estimator):
| metric | base (Qwen3.5-2B) | this model | Δ |
|---|---|---|---|
| pass@1 | 0.098 | 0.408 | +0.310 |
| pass@2 | 0.168 | 0.514 | +0.346 |
| pass@3 | 0.229 | 0.567 | +0.338 |
| pass@4 | 0.284 | 0.603 | +0.319 |
from transformers import AutoModelForCausalLM, AutoTokenizer
m = AutoModelForCausalLM.from_pretrained("AdithyaSK/data-agent-2b-normal-final", revision="v0", torch_dtype="bfloat16")
tok = AutoTokenizer.from_pretrained("AdithyaSK/data-agent-2b-normal-final", revision="v0")
Part of the data-agent v0 release. Served non-thinking with a single bash tool (Qwen tool-calling).