This model has been optimized using DPO to align its responses with preferred outputs, focusing on improving reasoning (Chain-of-Thought) and structured response quality based on the provided preference dataset.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model_id = "Shion1124/dpo-qwen-cot-merged"
5tokenizer = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForCausalLM.from_pretrained(
7 model_id,
8 torch_dtype=torch.float16,
9 device_map="auto"
10)
11
12# Test inference
13prompt = "Your question here"
14# Note: Doubled braces { } are used here to escape them in the python f-string
15inputs = tokenizer.apply_chat_template([{"role": "user", "content": prompt}], tokenize=True, add_generation_prompt=True, return_tensors="pt").to("cuda")
16outputs = model.generate(**inputs, max_new_tokens=512)
17print(tokenizer.decode(outputs[0]))
18
-
Training Data: [u-10bei/dpo-dataset-qwen-cot]
-
License: MIT License. (As per dataset terms).
-
Compliance: Users must follow the original base model's license terms.
-
Training Data: (Supplementary)
- u-10bei/structured_data_with_cot_dataset_512_v5
- daichira/structured-hard-sft-4k
- u-10bei/dpo-dataset-qwen-cot