Views
No views yet
1base_model: someon98/qwen-CoMa-0.5b
2model_type: AutoModelForCausalLM
3tokenizer_type: AutoTokenizer
4
5load_in_8bit: true
6load_in_4bit: false
7strict: false
8
9chat_template: qwen_25
10datasets:
11 - path: /kaggle/working/custom_dataset.json
12 type: chat_template
13 conversation: chatml
14 ds_type: json
15
16add_bos_token: true
17add_eos_token: true
18use_default_system_prompt: false
19
20adapter: lora
21lora_model_dir:
22lora_r: 16
23lora_alpha: 32
24lora_dropout: 0.1
25lora_target_linear: true
26
27sequence_len: 2048
28sample_packing: false
29pad_to_sequence_len: true
30micro_batch_size: 2
31gradient_accumulation_steps: 8
32num_epochs: 1
33learning_rate: 2e-5
34optimizer: paged_adamw_8bit
35lr_scheduler: cosine
36
37train_on_inputs: false
38group_by_length: false
39bf16: false
40fp16: true
41tf32: false
42
43gradient_checkpointing: true
44flash_attention: false
45
46logging_steps: 50
47warmup_steps: 100
48saves_per_epoch: 1
49
50output_dir: ./qwen-sft-results
51save_safetensors: true1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model = AutoModelForCausalLM.from_pretrained(
5 "suayptalha/DeepSeek-R1-Distill-Qwen-0.5B-CoMa",
6 device_map="auto"
7)
8
9tokenizer = AutoTokenizer.from_pretrained("suayptalha/DeepSeek-R1-Distill-Qwen-0.5B-CoMa")
10
11SYSTEM_PROMPT = """Respond in the following format:
12<think>
13You should reason between these tags.
14</think>
15
16Answer goes here...
17
18Always use <think> </think> tags even if they are not necessary.
19"""
20
21messages = [
22 {"role": "system", "content": SYSTEM_PROMPT},
23 {"role": "user", "content": "Which one is larger? 9.11 or 9.9?"},
24]
25inputs = tokenizer.apply_chat_template(
26 messages,
27 tokenize = True,
28 add_generation_prompt = True,
29 return_tensors = "pt",
30).to("cuda")
31output = model.generate(input_ids=inputs, max_new_tokens=256, use_cache=True, temperature=0.7)
32decoded_output = tokenizer.decode(output[0], skip_special_tokens=False)
33print(decoded_output)<think>
First, I need to compare the two numbers 9.11 and 9.9.
Next, I'll analyze each number. The first digit after the decimal point in 9.11 is 1, and in 9.9, it's 9.
Since 9 is greater than 1, 9.9 is larger than 9.11.
</think>
To determine which number is larger, let's compare the two numbers:
**9.11** and **9.9**
1. **Identify the Decimal Places:**
- Both numbers have two decimal places.
2. **Compare the Tens Place (Right of the Decimal Point):**
- **9.11:** The tens place is 1.
- **9.9:** The tens place is 9.
3. **Conclusion:**
- Since 9 is greater than 1, the number with the larger tens place is 9.9.
**Answer:** **9.9** is larger than **9.11**.Respond in the following format:
<think>
You should reason between these tags.
</think>
Answer goes here...
Always use <think> </think> tags even if they are not necessary.