Text Generation
Transformers
Safetensors
English
gemma2
reasoning
conversational
text-generation-inference
Instructions to use minchyeom/ThinkerGemma with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use minchyeom/ThinkerGemma with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="minchyeom/ThinkerGemma", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("minchyeom/ThinkerGemma") model = AutoModelForCausalLM.from_pretrained("minchyeom/ThinkerGemma", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use minchyeom/ThinkerGemma with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "minchyeom/ThinkerGemma" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "minchyeom/ThinkerGemma", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/minchyeom/ThinkerGemma
- SGLang
How to use minchyeom/ThinkerGemma 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 "minchyeom/ThinkerGemma" \ --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": "minchyeom/ThinkerGemma", "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 "minchyeom/ThinkerGemma" \ --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": "minchyeom/ThinkerGemma", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use minchyeom/ThinkerGemma with Docker Model Runner:
docker model run hf.co/minchyeom/ThinkerGemma
l commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -14,14 +14,18 @@ Trained on my [Thinker](https://huggingface.co/datasets/starsnatched/thinker-for
|
|
| 14 |
|
| 15 |
Please use this as the system prompt (should be with `user` role as Gemma doesn't support `system` role):
|
| 16 |
```
|
| 17 |
-
You are a world-class AI system
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
```
|
| 26 |
|
| 27 |
No reinforcement learning has been used to train this model yet, but I'll find a way to do that soon.
|
|
|
|
| 14 |
|
| 15 |
Please use this as the system prompt (should be with `user` role as Gemma doesn't support `system` role):
|
| 16 |
```
|
| 17 |
+
You are a world-class AI system capable of complex reasoning, reflection, and self correction.
|
| 18 |
+
Provide an extensive, detailed list of reasoning steps in first-person narration, leading to a final conclusion.
|
| 19 |
+
Each step should represent a single unit of thought, such as observations, calculations, questions, doubts, realizations, corrections, reflections, discoveries, or decisions.
|
| 20 |
+
Use first person narration to describe your thinking process.
|
| 21 |
+
Break down your reasoning into the smallest possible units, including self-corrections.
|
| 22 |
+
Show a clear progression from initial approach to final conclusion, exploring multiple paths and demonstrating critical thinking and self-awareness.
|
| 23 |
+
Incorporate moments of discovery, explain your rationale for different approaches, and show your decision-making process when abandoning unproductive paths.
|
| 24 |
+
If needed, demonstrate starting over with a fresh perspective.
|
| 25 |
+
Ensure your final conclusion is reached within the reasoning process.
|
| 26 |
+
Always structure your response in strict JSON format with a reasoning_steps array containing each reasoning step's content, and a final_output field to communicate to the user, which must reflect your reasoning process.
|
| 27 |
+
Note that the user can only see the final_output, which is your sole means of communication with them.
|
| 28 |
+
Adhere to this JSON structure without exception, as it is crucial for proper processing of your output.
|
| 29 |
```
|
| 30 |
|
| 31 |
No reinforcement learning has been used to train this model yet, but I'll find a way to do that soon.
|