Text Generation
Transformers
Safetensors
qwen3
agents
terminal
code
software-engineering
reinforcement-learning
rl
conversational
text-generation-inference
Instructions to use open-thoughts/OpenThinkerAgent-8B-RL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use open-thoughts/OpenThinkerAgent-8B-RL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="open-thoughts/OpenThinkerAgent-8B-RL") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("open-thoughts/OpenThinkerAgent-8B-RL") model = AutoModelForMultimodalLM.from_pretrained("open-thoughts/OpenThinkerAgent-8B-RL") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use open-thoughts/OpenThinkerAgent-8B-RL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "open-thoughts/OpenThinkerAgent-8B-RL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "open-thoughts/OpenThinkerAgent-8B-RL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/open-thoughts/OpenThinkerAgent-8B-RL
- SGLang
How to use open-thoughts/OpenThinkerAgent-8B-RL 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 "open-thoughts/OpenThinkerAgent-8B-RL" \ --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": "open-thoughts/OpenThinkerAgent-8B-RL", "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 "open-thoughts/OpenThinkerAgent-8B-RL" \ --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": "open-thoughts/OpenThinkerAgent-8B-RL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use open-thoughts/OpenThinkerAgent-8B-RL with Docker Model Runner:
docker model run hf.co/open-thoughts/OpenThinkerAgent-8B-RL
| base_model: | |
| - open-thoughts/OpenThinkerAgent-8B-ColdStartSFTForRL | |
| datasets: | |
| - open-thoughts/OpenThoughts-Agent-RL-5K | |
| - open-thoughts/OpenThoughts-Agent-SFT-ColdStartForRL-10K | |
| library_name: transformers | |
| license: apache-2.0 | |
| model-index: | |
| - name: OpenThinkerAgent-8B-RL | |
| results: [] | |
| pipeline_tag: text-generation | |
| tags: | |
| - agents | |
| - terminal | |
| - code | |
| - software-engineering | |
| - reinforcement-learning | |
| - rl | |
| <p align="center"> | |
| <img src="https://huggingface.co/datasets/open-thoughts/OpenThoughts1-Agent-SFT/resolve/main/ota-logo.png" width="50%"> | |
| </p> | |
| <p align="center"> | |
| <a href="https://www.openthoughts.ai/blog/agent" style="margin-right: 24px;">Project</a> | | |
| <a href="https://github.com/open-thoughts/OpenThoughts-Agent" style="margin-right: 24px; margin-left: 24px;">Code</a> | | |
| <a href="https://huggingface.co/collections/open-thoughts/openthinker-agent" style="margin-left: 24px;">Collection</a> | |
| </p> | |
| # OpenThinkerAgent-8B-RL | |
| **OpenThoughts-Agent** is an open-source effort to curate the best datasets for training agents. Our release includes [datasets](https://huggingface.co/collections/open-thoughts/openthinker-agent), [models](https://huggingface.co/collections/open-thoughts/openthinker-agent) and our [research codebase](https://github.com/open-thoughts/OpenThoughts-Agent). | |
| [OpenThinkerAgent-8B-RL](https://huggingface.co/open-thoughts/OpenThinkerAgent-8B-RL) is the **final, RL-trained** 8B agentic checkpoint of the OpenThoughts-Agent SFTβRL recipe. Starting from the cold-start SFT base [OpenThinkerAgent-8B-ColdStartSFTForRL](https://huggingface.co/open-thoughts/OpenThinkerAgent-8B-ColdStartSFTForRL), it is further trained with on-policy reinforcement learning on the [OpenThoughts-Agent-RL-5K](https://huggingface.co/datasets/open-thoughts/OpenThoughts-Agent-RL-5K) task set. This checkpoint corresponds to **RL step 45**. | |
| > **Architecture note.** Although the upstream lineage carries a `GLM-4.7` label (which refers to the *teacher* used for the cold-start SFT trajectories, not the student), this model is a **Qwen3-8B**. Its `config.json` reports `model_type: qwen3`, `architectures: ["Qwen3ForCausalLM"]`, 36 layers, hidden size 4096, 32 attention heads / 8 KV heads, and a 40,960-token context β i.e. standard Qwen3-8B. | |
| - **Homepage:** https://www.openthoughts.ai/blog/agent | |
| - **Repository:** https://github.com/open-thoughts/OpenThoughts-Agent | |
| # Model details | |
| - **Base (pre-RL) model:** [OpenThinkerAgent-8B-ColdStartSFTForRL](https://huggingface.co/open-thoughts/OpenThinkerAgent-8B-ColdStartSFTForRL) (itself an SFT of [Qwen/Qwen3-8B](https://huggingface.co/Qwen/Qwen3-8B)) | |
| - **Architecture:** Qwen3 (`Qwen3ForCausalLM`), 36 layers, hidden size 4096, 32 attention heads, 8 KV heads, RoPE ΞΈ = 1e6 | |
| - **Context length:** 40,960 tokens (max position embeddings); RL rollouts used a 32,768-token serving window | |
| - **Vocabulary:** 151,936 tokens | |
| - **Precision:** bf16 | |
| - **Checkpoint:** RL step 45 | |
| # The SFT β RL recipe | |
| 1. [OpenThoughts-Agent-SFT-ColdStartForRL-10K](https://huggingface.co/datasets/open-thoughts/OpenThoughts-Agent-SFT-ColdStartForRL-10K) β cold-start SFT trajectories. | |
| 2. [OpenThinkerAgent-8B-ColdStartSFTForRL](https://huggingface.co/open-thoughts/OpenThinkerAgent-8B-ColdStartSFTForRL) β Qwen3-8B after cold-start SFT (the pre-RL base). | |
| 3. [OpenThoughts-Agent-RL-5K](https://huggingface.co/datasets/open-thoughts/OpenThoughts-Agent-RL-5K) β the 5,000 on-policy RL tasks. | |
| 4. **[OpenThinkerAgent-8B-RL](https://huggingface.co/open-thoughts/OpenThinkerAgent-8B-RL)** β this model, the final RL'd checkpoint (step 45). | |
| # Training data | |
| - **Cold-start SFT:** [OpenThoughts-Agent-SFT-ColdStartForRL-10K](https://huggingface.co/datasets/open-thoughts/OpenThoughts-Agent-SFT-ColdStartForRL-10K) (9,437 task/trajectory pairs). | |
| - **RL tasks:** [OpenThoughts-Agent-RL-5K](https://huggingface.co/datasets/open-thoughts/OpenThoughts-Agent-RL-5K) (5,000 `pymethods2test-large` tasks); the policy rolls out against each task in a Daytona sandbox and is rewarded by the task's test verifier. | |
| # Training procedure | |
| On-policy RL with the OpenThoughts-Agent codebase (SkyRL), recorded in the run config shipped with this repo (`swesmith-fixthink-pymethods2test_rl_config.json`): | |
| - **Algorithm:** RLOO-n advantage estimator (`advantage_estimator=rloo_n`), no KL loss (`use_kl_loss=false`, `kl_loss_coef=0.0`) | |
| - **PPO clip:** eps_clip_low/high = 0.2, loss reduction = token_mean | |
| - **Optimizer:** AdamW, learning_rate 5e-6, weight_decay 0.0, betas (0.9, 0.999) | |
| - **Batch:** train_batch_size 64, policy_mini_batch_size 64 | |
| - **Rollouts:** vLLM backend, 8 samples per prompt, sampling temperature 0.7 / top_p 0.95 / top_k 20, max generate length 4096, served at 32,768-token context | |
| - **Harness:** terminus-2 agent in Daytona sandboxes; interleaved thinking enabled | |
| - **Strategy:** FSDP2; HF checkpoint exported every 5 RL steps; **this artifact is step 45** | |
| # Intended uses & limitations | |
| This is an **agentic coding model**: it is designed to operate as a tool-using agent in the terminus-2 harness (issuing shell commands / edits and reasoning over terminal output) to solve software-engineering tasks. It inherits Qwen3-8B's general capabilities plus agentic behaviour from cold-start SFT and the RL stage. Limitations: outputs (including shell commands) may be incorrect or unsafe and should be executed only in sandboxed environments with review; the RL stage optimized for the `pymethods2test`/SWE-Smith-style task distribution and may generalize unevenly to other domains. | |
| > **Evaluation:** No verified agentic-benchmark numbers are published for this specific 8B RL checkpoint in the source artifact; evaluation results are **TBD**. (The flagship [OpenThinkerAgent-32B](https://huggingface.co/open-thoughts/OpenThinkerAgent-32B) card reports the project's benchmark suite for the 32B SFT line.) | |
| # Links | |
| - π [OpenThoughts-Agent project page](https://www.openthoughts.ai/blog/agent) | |
| - π» [OpenThoughts-Agent GitHub repository](https://github.com/open-thoughts/OpenThoughts-Agent) | |
| - π [OpenThinker-Agent collection](https://huggingface.co/collections/open-thoughts/openthinker-agent) | |
| - π€ [Pre-RL base model: OpenThinkerAgent-8B-ColdStartSFTForRL](https://huggingface.co/open-thoughts/OpenThinkerAgent-8B-ColdStartSFTForRL) | |
| - π§ [RL tasks: OpenThoughts-Agent-RL-5K](https://huggingface.co/datasets/open-thoughts/OpenThoughts-Agent-RL-5K) | |
| - π§ [Cold-start SFT dataset: OpenThoughts-Agent-SFT-ColdStartForRL-10K](https://huggingface.co/datasets/open-thoughts/OpenThoughts-Agent-SFT-ColdStartForRL-10K) | |
| # Citation | |
| ``` | |
| @misc{openthoughts-agent, | |
| author = {Team, OpenThoughts-Agent}, | |
| title = {{OpenThoughts-Agent: Data Recipes for Agentic Models}}, | |
| howpublished = {https://www.openthoughts.ai/blog/agent}, | |
| year = {2026} | |
| } | |
| ``` | |