Views
No views yet
Thinking... block before providing the final answer.| Attribute | Value |
|---|---|
| Base Model | google/gemma-2-2b |
| Training Dataset | opus-research/opus-thinking-10k |
| Training Method | LoRA (r=16, alpha=32) |
| Precision | bfloat16 |
| Training Steps | 566 (~1 epoch on 9k examples) |
Thinking...
[Internal reasoning process - analyzing the question, considering options, working through logic]
...done Thinking!
[Final helpful response]1from transformers import AutoTokenizer, AutoModelForCausalLM
2from peft import PeftModel
3
4# Load base model
5base_model = AutoModelForCausalLM.from_pretrained(
6 "google/gemma-2-2b",
7 torch_dtype="bfloat16",
8 device_map="auto"
9)
10
11# Load LoRA adapters
12model = PeftModel.from_pretrained(base_model, "opus-research/gemma-2-2b-thinking")
13tokenizer = AutoTokenizer.from_pretrained("opus-research/gemma-2-2b-thinking")
14
15# Generate
16prompt = "<start_of_turn>user\nWhat is 15 times 7?<end_of_turn>\n<start_of_turn>model\n"
17inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
18outputs = model.generate(**inputs, max_new_tokens=200)
19print(tokenizer.decode(outputs[0], skip_special_tokens=True))Thinking...
Python is more general-purpose, JavaScript is web-focused. Python is easier to learn, JavaScript is more widely used.
...done Thinking!
Python is often seen as a more beginner-friendly language due to its simpler syntax and readability. However, JavaScript is widely used in web development and is essential for creating interactive web applications. The best choice depends on your career goals and interests. If you're interested in web development, start with JavaScript. If you want a more general-purpose language, start with Python.Thinking...
Joke search.
...done Thinking!
Okay, here's one: Why don't scientists trust atoms? Because they make up everything!Thinking... / ...done Thinking! format
| Metric | Value |
|---|---|
| Start Loss | 3.56 |
| Final Loss | 0.69 |
| Reduction | 80.7% |
| Training Time | 1h 42m |
| Hardware | 2x NVIDIA RTX 4090 |
1@misc{opus-gemma-thinking,
2 author = {Opus Research},
3 title = {Gemma 2 2B Thinking - Chain-of-Thought Fine-tune},
4 year = {2024},
5 publisher = {Hugging Face},
6 url = {https://huggingface.co/opus-research/gemma-2-2b-thinking}
7}