Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use open-thoughts/OpenThinker3-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use open-thoughts/OpenThinker3-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="open-thoughts/OpenThinker3-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("open-thoughts/OpenThinker3-7B") model = AutoModelForCausalLM.from_pretrained("open-thoughts/OpenThinker3-7B") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use open-thoughts/OpenThinker3-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "open-thoughts/OpenThinker3-7B" # 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/OpenThinker3-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/open-thoughts/OpenThinker3-7B
- SGLang
How to use open-thoughts/OpenThinker3-7B 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/OpenThinker3-7B" \ --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/OpenThinker3-7B", "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/OpenThinker3-7B" \ --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/OpenThinker3-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use open-thoughts/OpenThinker3-7B with Docker Model Runner:
docker model run hf.co/open-thoughts/OpenThinker3-7B
Update README.md
Browse files
README.md
CHANGED
|
@@ -29,9 +29,9 @@ State-of-the-art open-data 7B reasoning model. 🚀
|
|
| 29 |
|
| 30 |
This model is a fine-tuned version of [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) on the
|
| 31 |
[OpenThoughts3-1.2M](https://huggingface.co/datasets/open-thoughts/OpenThoughts3-1.2M) dataset.
|
| 32 |
-
It represents a notable improvement over our previous models, [OpenThinker-7B](https://huggingface.co/open-thoughts/OpenThinker-7B) and [OpenThinker2-7B](https://huggingface.co/open-thoughts/OpenThinker2-7B), and it outperforms several other strong reasoning 7B models such as [DeepSeek-R1-Distill-Qwen-
|
| 33 |
|
| 34 |
-
This time, we also
|
| 35 |
|
| 36 |
# Evaluation Results
|
| 37 |
The numbers reported in the table below are evaluated with our open-source tool [Evalchemy](https://github.com/mlfoundations/Evalchemy).
|
|
@@ -52,8 +52,8 @@ In the table below, we bold values in each column that are within 2 standard err
|
|
| 52 |
|
| 53 |
This model was trained on the [OpenThoughts3-1.2M](https://huggingface.co/datasets/open-thoughts/OpenThoughts3-1.2M) dataset.
|
| 54 |
|
| 55 |
-
The key
|
| 56 |
-
This led to the creation of [OpenThoughts3-1.2M](https://huggingface.co/datasets/open-thoughts/OpenThoughts3-1.2M), which consists of 850,000 math
|
| 57 |
Reasoning traces are generated with QwQ-32B.
|
| 58 |
|
| 59 |
See the [OpenThoughts3-1.2M](https://huggingface.co/datasets/open-thoughts/OpenThoughts3-1.2M) dataset page or our [paper](https://arxiv.org/abs/2506.04178) for additional information.
|
|
@@ -81,6 +81,7 @@ The following hyperparameters were used during training:
|
|
| 81 |
- lr_scheduler_type: cosine
|
| 82 |
- lr_scheduler_warmup_ratio: 0.1
|
| 83 |
- num_epochs: 5.0
|
|
|
|
| 84 |
|
| 85 |
## Framework versions
|
| 86 |
|
|
|
|
| 29 |
|
| 30 |
This model is a fine-tuned version of [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) on the
|
| 31 |
[OpenThoughts3-1.2M](https://huggingface.co/datasets/open-thoughts/OpenThoughts3-1.2M) dataset.
|
| 32 |
+
It represents a notable improvement over our previous models, [OpenThinker-7B](https://huggingface.co/open-thoughts/OpenThinker-7B) and [OpenThinker2-7B](https://huggingface.co/open-thoughts/OpenThinker2-7B), and it outperforms several other strong reasoning 7B models such as [DeepSeek-R1-Distill-Qwen-7B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B) and [Llama-3.1-Nemotron-Nano-8B-v1](https://huggingface.co/nvidia/Llama-3.1-Nemotron-Nano-8B-v1), despite being trained only with SFT, without any RL.
|
| 33 |
|
| 34 |
+
This time, we also released a paper! See our [paper](https://arxiv.org/abs/2506.04178) and [blog post](https://openthoughts.ai/blog/ot3) for more details. OpenThinker3-32B to follow! 👀
|
| 35 |
|
| 36 |
# Evaluation Results
|
| 37 |
The numbers reported in the table below are evaluated with our open-source tool [Evalchemy](https://github.com/mlfoundations/Evalchemy).
|
|
|
|
| 52 |
|
| 53 |
This model was trained on the [OpenThoughts3-1.2M](https://huggingface.co/datasets/open-thoughts/OpenThoughts3-1.2M) dataset.
|
| 54 |
|
| 55 |
+
The key to the strong model performance is our comprehensive data pipeline and over 1,000+ ablation experiments.
|
| 56 |
+
This led to the creation of [OpenThoughts3-1.2M](https://huggingface.co/datasets/open-thoughts/OpenThoughts3-1.2M), which consists of 850,000 math questions, 250,000 code questions, and 100,000 science questions.
|
| 57 |
Reasoning traces are generated with QwQ-32B.
|
| 58 |
|
| 59 |
See the [OpenThoughts3-1.2M](https://huggingface.co/datasets/open-thoughts/OpenThoughts3-1.2M) dataset page or our [paper](https://arxiv.org/abs/2506.04178) for additional information.
|
|
|
|
| 81 |
- lr_scheduler_type: cosine
|
| 82 |
- lr_scheduler_warmup_ratio: 0.1
|
| 83 |
- num_epochs: 5.0
|
| 84 |
+
- weight_decay: 0.0
|
| 85 |
|
| 86 |
## Framework versions
|
| 87 |
|