Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use open-thoughts/OpenThinker-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use open-thoughts/OpenThinker-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="open-thoughts/OpenThinker-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("open-thoughts/OpenThinker-7B") model = AutoModelForCausalLM.from_pretrained("open-thoughts/OpenThinker-7B", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use open-thoughts/OpenThinker-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "open-thoughts/OpenThinker-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/OpenThinker-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/open-thoughts/OpenThinker-7B
- SGLang
How to use open-thoughts/OpenThinker-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/OpenThinker-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/OpenThinker-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/OpenThinker-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/OpenThinker-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use open-thoughts/OpenThinker-7B with Docker Model Runner:
docker model run hf.co/open-thoughts/OpenThinker-7B
Update README.md
Browse files
README.md
CHANGED
|
@@ -9,29 +9,43 @@ tags:
|
|
| 9 |
model-index:
|
| 10 |
- name: DCFT-Stratos-Verified-114k-7B-4gpus
|
| 11 |
results: []
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
-
<
|
| 15 |
-
|
|
|
|
| 16 |
|
| 17 |
-
#
|
| 18 |
|
| 19 |
-
This model is a fine-tuned version of [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) on the
|
|
|
|
| 20 |
|
| 21 |
-
|
|
|
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
-
## Intended uses & limitations
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
##
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
More information needed
|
| 32 |
|
| 33 |
## Training procedure
|
| 34 |
|
|
|
|
|
|
|
| 35 |
### Training hyperparameters
|
| 36 |
|
| 37 |
The following hyperparameters were used during training:
|
|
@@ -49,13 +63,21 @@ The following hyperparameters were used during training:
|
|
| 49 |
- lr_scheduler_warmup_ratio: 0.1
|
| 50 |
- num_epochs: 3.0
|
| 51 |
|
| 52 |
-
### Training results
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
### Framework versions
|
| 57 |
|
| 58 |
- Transformers 4.46.1
|
| 59 |
- Pytorch 2.3.0
|
| 60 |
- Datasets 3.1.0
|
| 61 |
- Tokenizers 0.20.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
model-index:
|
| 10 |
- name: DCFT-Stratos-Verified-114k-7B-4gpus
|
| 11 |
results: []
|
| 12 |
+
datasets:
|
| 13 |
+
- open-thoughts/open-thoughts-114k
|
| 14 |
---
|
| 15 |
|
| 16 |
+
<p align="center">
|
| 17 |
+
<img src="https://huggingface.co/datasets/open-thoughts/open-thoughts-114k/resolve/main/open_thoughts.png" width="50%">
|
| 18 |
+
</p>
|
| 19 |
|
| 20 |
+
# OpenThinker-7B
|
| 21 |
|
| 22 |
+
This model is a fine-tuned version of [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) on the
|
| 23 |
+
[OpenThoughts-114k dataset](https://huggingface.co/datasets/open-thoughts/OpenThoughts-114k) dataset.
|
| 24 |
|
| 25 |
+
The dataset is derived by distilling DeepSeek-R1 using the [data pipeline available on github](https://github.com/open-thoughts/open-thoughts).
|
| 26 |
+
More info about the dataset can be found on the dataset card at [OpenThoughts-114k dataset](https://huggingface.co/datasets/open-thoughts/open-thoughts-114k).
|
| 27 |
|
| 28 |
+
This model improves upon the [Bespoke-Stratos-7B model](https://huggingface.co/bespokelabs/Bespoke-Stratos-7B), which used 17k examples ([Bespoke-Stratos-17k dataset](https://huggingface.co/datasets/bespokelabs/Bespoke-Stratos-17k)).
|
| 29 |
|
|
|
|
| 30 |
|
| 31 |
+
| | AIME24 | MATH500 | GPQA-D | LCB Easy | LCB Med | LCB Hard | Open Weights | Open Data | Open Code |
|
| 32 |
+
|--|--------|---------|--------|----------|---------|----------|--------------|-----------| --------- |
|
| 33 |
+
|OpenThinker-7B|26.7|86|40.4|74.2|31.1|3.3|β|[β](https://huggingface.co/datasets/open-thoughts/OpenThoughts-114k)|[β](https://github.com/open-thoughts/open-thoughts) |
|
| 34 |
+
|Bespoke-Stratos-7B|20.0|82.0|37.8|71.4|25.2|1.6|β|[β](https://huggingface.co/datasets/bespokelabs/Bespoke-Stratos-17k)|[β](https://github.com/bespokelabsai/curator/tree/main/examples/bespoke-stratos-data-generation)|
|
| 35 |
+
|DeepSeek-R1-Distill-Qwen-7B|43.3|89.4|44.9|81.3|42.2|2.4|β|β|β|
|
| 36 |
+
|gpt-4o-0513|9.3|74.6|49.9|-|-|-|β|β|β|
|
| 37 |
+
|o1-mini|63.6|90.0|60.0|-|-|-|β|β|β|
|
| 38 |
+
|
| 39 |
|
| 40 |
+
## Intended uses & limitations
|
| 41 |
+
|
| 42 |
+
Apache 2.0 License
|
| 43 |
|
|
|
|
| 44 |
|
| 45 |
## Training procedure
|
| 46 |
|
| 47 |
+
We used four 8xH100 nodes to train the model for 20 hours.
|
| 48 |
+
|
| 49 |
### Training hyperparameters
|
| 50 |
|
| 51 |
The following hyperparameters were used during training:
|
|
|
|
| 63 |
- lr_scheduler_warmup_ratio: 0.1
|
| 64 |
- num_epochs: 3.0
|
| 65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
### Framework versions
|
| 67 |
|
| 68 |
- Transformers 4.46.1
|
| 69 |
- Pytorch 2.3.0
|
| 70 |
- Datasets 3.1.0
|
| 71 |
- Tokenizers 0.20.3
|
| 72 |
+
|
| 73 |
+
More info can be found in our repository: [https://github.com/open-thoughts/open-thoughts](https://github.com/open-thoughts/open-thoughts).
|
| 74 |
+
|
| 75 |
+
# Links
|
| 76 |
+
- π [Open Thoughts Launch Blog Post](https://www.open-thoughts.ai/blog/launch)
|
| 77 |
+
- π [Open Thoughts GitHub Repository](https://github.com/open-thoughts/open-thoughts)
|
| 78 |
+
- π§ [OpenThoughts-114k dataset](https://huggingface.co/datasets/open-thoughts/OpenThoughts-114k)
|
| 79 |
+
- π€ [OpenThinker-7B model](https://huggingface.co/open-thoughts/OpenThinker-7B) - this model.
|
| 80 |
+
- π [Bespoke-Stratos Blog Post](https://www.bespokelabs.ai/blog/bespoke-stratos-the-unreasonable-effectiveness-of-reasoning-distillation)
|
| 81 |
+
- π§ [Bespoke-Stratos-17k dataset](https://huggingface.co/datasets/bespokelabs/Bespoke-Stratos-17k)
|
| 82 |
+
- π€ [Bespoke-Stratos-32B model](https://huggingface.co/bespokelabs/Bespoke-Stratos-32B)
|
| 83 |
+
- π€ [Bespoke-Stratos-7B model](https://huggingface.co/bespokelabs/Bespoke-Stratos-7B)
|