Views
No views yet
<think> block.1<|im_start|>user
2{Question}<|im_end|>
3<|im_start|>assistant
4<think>1
2import jax
3import jax.numpy as jnp
4from transformers import AutoTokenizer, FlaxAutoModelForCausalLM
5
6# 1. Load Model & Tokenizer
7model_id = "Arko007/zenyx-deepseek-220m"
8tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct", trust_remote_code=True)
9model = FlaxAutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
10
11# 2. Add Special Reasoning Tokens
12new_tokens = ["<think>", "</think>", "<answer>", "</answer>"]
13tokenizer.add_special_tokens({"additional_special_tokens": new_tokens})
14
15# 3. Format Input
16prompt = "If I have 3 apples and eat one, how many oranges do I have?"
17formatted_prompt = f"<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant\n<think>\n"
18
19# 4. Generate
20inputs = tokenizer(formatted_prompt, return_tensors="np")
21output_ids = model.generate(
22 **inputs,
23 max_new_tokens=2048,
24 do_sample=True,
25 temperature=0.7,
26 repetition_penalty=1.2
27)
28
29print(tokenizer.decode(output_ids.sequences[0], skip_special_tokens=False))1@misc{Zenyx220M,
2 title = {Zenyx-DeepSeek-220M: Nano-Scale Reasoning Model},
3 author = {Arko007},
4 year = {2025},
5 publisher = {HuggingFace},
6 url = {[https://huggingface.co/Arko007/zenyx-deepseek-220m](https://huggingface.co/Arko007/zenyx-deepseek-220m)}
7}