Text Generation
Transformers
Safetensors
qwen3_5
image-text-to-text
reinforcement-learning
grpo
trl
harbor
data-agent
agentic
conversational
Instructions to use AdithyaSK/data-agent-2b-normal-best with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AdithyaSK/data-agent-2b-normal-best with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AdithyaSK/data-agent-2b-normal-best") 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-best") model = AutoModelForMultimodalLM.from_pretrained("AdithyaSK/data-agent-2b-normal-best", 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 AdithyaSK/data-agent-2b-normal-best with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AdithyaSK/data-agent-2b-normal-best" # 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-best", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AdithyaSK/data-agent-2b-normal-best
- SGLang
How to use AdithyaSK/data-agent-2b-normal-best 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 "AdithyaSK/data-agent-2b-normal-best" \ --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-best", "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 "AdithyaSK/data-agent-2b-normal-best" \ --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-best", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AdithyaSK/data-agent-2b-normal-best with Docker Model Runner:
docker model run hf.co/AdithyaSK/data-agent-2b-normal-best
File size: 1,954 Bytes
15ae1db | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | ---
license: apache-2.0
base_model: Qwen/Qwen3.5-2B
tags:
- reinforcement-learning
- grpo
- trl
- harbor
- data-agent
- agentic
pipeline_tag: text-generation
library_name: transformers
---
# data-agent-2b-normal-best (v0)
A **2B** data-science agent finetuned from [`Qwen/Qwen3.5-2B`](https://huggingface.co/Qwen/Qwen3.5-2B) with
**GRPO** (online RL) to solve data-analysis tasks in a sandboxed bash environment. This repo holds
the **best-eval** checkpoint (peak pass@4, step 800) of the `2b-normal` run.
## Training
- **Method:** GRPO (Group Relative Policy Optimization) via [TRL](https://github.com/huggingface/trl).
- **Environment:** [Harbor](https://github.com/huggingface/trl) task spec + **E2B** cloud sandboxes; single `bash` tool, answer submitted to `/workdir/answer.txt`.
- **Dataset:** [`AdithyaSK/data_agent_rl_environment_train`](https://huggingface.co/datasets/AdithyaSK/data_agent_rl_environment_train).
- **Schedule:** 1 epoch (1119 steps), 8 generations/prompt, KL-anchored to the reference. Tasks were presented in random order (standard).
- **This checkpoint:** step **800** (best-eval).
## Evaluation
Agentic pass@k on the held-out [`data_agent_rl_environment_eval`](https://huggingface.co/datasets/AdithyaSK/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.395** | +0.297 |
| pass@2 | 0.168 | **0.509** | +0.341 |
| pass@3 | 0.229 | **0.577** | +0.348 |
| pass@4 | 0.284 | **0.624** | +0.340 |
## Usage
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
m = AutoModelForCausalLM.from_pretrained("AdithyaSK/data-agent-2b-normal-best", revision="v0", torch_dtype="bfloat16")
tok = AutoTokenizer.from_pretrained("AdithyaSK/data-agent-2b-normal-best", revision="v0")
```
*Part of the **data-agent v0** release. Served non-thinking with a single `bash` tool (Qwen tool-calling).*
|