Views
No views yet
qwen35-2b-general model is designed to handle everyday questions, write short stories, and help with simple daily tasks (like drafting a message or rewriting text) where no tools are needed. It acts as a friendly, general assistant.expert_general_story.jsonl dataset consisting of 200 high-quality synthetic examples formatted in the standard Qwen/HuggingFace ChatML format.1import torch
2from unsloth import FastLanguageModel
3
4max_seq_length = 4096
5
6model, tokenizer = FastLanguageModel.from_pretrained(
7 model_name = "checkpoints/qwen35-2b-general",
8 max_seq_length = max_seq_length,
9 dtype = torch.float32,
10)
11
12FastLanguageModel.for_inference(model)
13
14user_question = "Viết giúp tôi một câu chuyện ngắn về tình bạn."
15prompt = f"<|im_start|>user\n{user_question}<|im_end|>\n<|im_start|>assistant\n<think>\n"
16
17inputs = tokenizer(
18 text = prompt,
19 return_tensors = "pt",
20 add_special_tokens = False
21).to("cuda")
22
23outputs = model.generate(
24 **inputs,
25 max_new_tokens = 1024,
26 use_cache = True,
27 pad_token_id = tokenizer.eos_token_id,
28 repetition_penalty = 1.15,
29 temperature = 0.6,
30 top_p = 0.95,
31 top_k = 20,
32 min_p = 0.00,
33 do_sample = True
34)
35
36response = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
37answer = response.split("assistant\n")[-1].strip()
38
39print(answer)mergekit-moe, the following positive prompts are recommended for routing: