Views
No views yet

Qwen3-0.6B-ft-bf16 is a fine-tuned, moderately abliterated variant based on Qwen3-0.6B, the latest generation of large language models in the Qwen series. This version emphasizes improved context awareness and balanced behavioral flexibility, offering reliable performance across a wide range of natural language tasks. It integrates moderate experimental freedoms while maintaining the core strengths of Qwen3, including instruction-following, multilingual understanding, and strong reasoning capabilities.
1pip install transformers==4.51.3
2pip install huggingface_hub[hf_xet]1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "prithivMLmods/Qwen3-0.6B-ft-bf16"
4
5# Load tokenizer and model
6tokenizer = AutoTokenizer.from_pretrained(model_name)
7model = AutoModelForCausalLM.from_pretrained(
8 model_name,
9 torch_dtype="auto",
10 device_map="auto"
11)
12
13# Define prompt and apply chat template
14prompt = "How does a rocket reach escape velocity?"
15messages = [{"role": "user", "content": prompt}]
16text = tokenizer.apply_chat_template(
17 messages,
18 tokenize=False,
19 add_generation_prompt=True,
20 enable_thinking=True
21)
22
23# Tokenize input
24model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
25
26# Generate response
27generated_ids = model.generate(
28 **model_inputs,
29 max_new_tokens=32768
30)
31output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
32
33# Optional: Separate thinking content
34try:
35 index = len(output_ids) - output_ids[::-1].index(151668) # token ID for </think>
36except ValueError:
37 index = 0
38
39thinking_content = tokenizer.decode(output_ids[:index], skip_special_tokens=True).strip("\n")
40content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("\n")
41
42print("thinking content:", thinking_content)
43print("content:", content)temperature=0.6, top_p=0.95, top_k=20, min_p=0.0temperature=0.7, top_p=0.8, top_k=20, min_p=0.03276838912{"answer": "B"}