Downloads · 30 days
12
10% of all-time downloads
weathermanj/Menda-3B-250
Menda-3B-250 is a text generation model from weathermanj. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
Menda-3B-250 is a fine-tuned version of Qwen2.5-3B-Instruct, trained with GRPO (Guided Reinforcement from Preference Optimization) for 250 steps. This model shows improved performance on reasoning benchmarks compared…
Downloads · 30 days
12
10% of all-time downloads
All-time downloads
126
Public
Parameters
3.1B
6.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.2 GB · 100%
From the Hugging Face model README
Menda-3B-250 is a fine-tuned version of Qwen2.5-3B-Instruct, trained with GRPO (Guided Reinforcement from Preference Optimization) for 250 steps. This model shows improved performance on reasoning benchmarks compared to the base model.
This model uses the standard Qwen2 chat template. For best results when using the model directly, format your prompts as follows:
<|im_start|>system
You are a helpful AI assistant.<|im_end|>
<|im_start|>user
Your question here<|im_end|>
<|im_start|>assistant
When using the model through the Hugging Face Transformers library, the chat template will be applied automatically when using the chat_template functionality:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "weathermanj/Menda-3B-250"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
messages = [
{"role": "system", "content": "You are a helpful AI assistant."},
{"role": "user", "content": "Explain the concept of machine learning in simple terms."}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False)
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=300)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
Menda-3B-250 has been evaluated on several standard benchmarks:
| Benchmark | Task Type | Accuracy |
|---|---|---|
| ARC-Challenge | Scientific Reasoning | 50.0% |
| BoolQ | Reading Comprehension | 80.0% |
| HellaSwag | Common Sense Reasoning | 40.0% |
| Lambada | Text Completion | 70.0% |
| PIQA | Physical Reasoning | 90.0% |
| Winogrande | Commonsense Reasoning | 90.0% |
| MMLU Category | Score |
|---|---|
| Overall | 68.95% |
| Humanities | 76.92% |
| Social Sciences | 75.83% |
| STEM | 60.00% |
| Other | 67.69% |
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "weathermanj/Menda-3B-250"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
prompt = "Explain the concept of machine learning in simple terms."
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=300)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "weathermanj/Menda-3B-250"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
messages = [
{"role": "system", "content": "You are a helpful AI assistant."},
{"role": "user", "content": "Give me a short introduction to large language models."}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=512
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)
You can also use this model with Ollama by converting it to GGUF format:
# Convert to GGUF
python -m llama_cpp.convert_hf_to_gguf weathermanj/Menda-3B-250 --outfile menda-3b-250.gguf
# Create Ollama model
cat > Modelfile << EOF
FROM menda-3b-250.gguf
TEMPLATE """{{ .Prompt }}"""
PARAMETER temperature 0.7
PARAMETER top_p 0.9
PARAMETER top_k 40
EOF
ollama create menda-3b-250 -f Modelfile
ollama run menda-3b-250
The model was trained using the GRPO methodology with the following configuration:
This model inherits the license of the base Qwen2.5-3B-Instruct model. Please refer to the Qwen2 license for details.