Downloads · 30 days
7
35% of all-time downloads
OsamaBinLikhon/NextStep-Coder-MoE
NextStep-Coder-MoE is a text generation model from OsamaBinLikhon. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
A high-performance tiny coding LLM with Interleaved Thinking capability for advanced reasoning and agentic workflows.
Downloads · 30 days
7
35% of all-time downloads
All-time downloads
20
Public
Repo size
6 MB
Likes
0
Public
Click a slice to open those files.
.json4.4 MB · 40%
From the Hugging Face model README
A high-performance tiny coding LLM with Interleaved Thinking capability for advanced reasoning and agentic workflows.
NextStep-Coder-MoE is a LoRA fine-tuned model based on Qwen2.5-Coder-1.5B, optimized for:
<think>...</think> tagsfrom transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load model
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-1.5B")
model = PeftModel.from_pretrained(base_model, "OsamaBinLikhon/NextStep-Coder-MoE")
tokenizer = AutoTokenizer.from_pretrained("OsamaBinLikhon/NextStep-Coder-MoE")
# Generate
prompt = "Write a Python function to check if a number is prime.\n<think>"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0]))
| Parameter | Value |
|---|---|
| Base Model | Qwen/Qwen2.5-Coder-1.5B |
| Method | LoRA (r=16, alpha=32) |
| Trainable Params | 18.4M (1.18%) |
| Precision | bf16 |
| Framework | Transformers + PEFT |
The model uses <think> tags to show reasoning:
User: Write a binary search function.
Model: <think>
I need to implement binary search on a sorted array.
Key steps: find middle, compare, narrow search space.
Edge case: empty array returns -1.
</think>
def binary_search(arr, target):
left, right = 0, len(arr) - 1
while left <= right:
mid = (left + right) // 2
if arr[mid] == target:
return mid
elif arr[mid] < target:
left = mid + 1
else:
right = mid - 1
return -1
<think> tag retention in conversation historyOsamaBinLikhon
Apache 2.0