YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/model-cards#model-card-metadata)
create_model_card.py
import torch
model_card = """--- language: - en tags: - math - reasoning - qwen - symbolic-math - algebra - calculus license: apache-2.0 datasets: - mathematical-reasoning - symbolic-math
Qwen2.5-Math-1.5B with Enhanced Symbolic Math Capabilities
Model Description
This is a merged version of Qwen2.5-Math-1.5B with the Kevinmastascusa/symbolic-math-qwen2p5-1p5b-lora adapter, providing enhanced symbolic mathematical reasoning capabilities.
Model Sources
- Base Model: Qwen/Qwen2.5-Math-1.5B
- LoRA Adapter: Kevinmastascusa/symbolic-math-qwen2p5-1p5b-lora
- Merged By: TroglodyteDerivations
Capabilities
- β Algebraic problem solving
- β Step-by-step mathematical reasoning
- β Symbolic math operations
- β Calculus and derivatives
- β Percentage calculations
- β Quadratic equations
- β Geometric calculations
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_name = "TroglodyteDerivations/qwen2p5-math-1p5b-merged"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_name,
trust_remote_code=True,
torch_dtype=torch.float32,
device_map="auto"
)
# Solve a math problem
prompt = "Solve for x: 2x + 5 = 13"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=150,
do_sample=False,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
- Downloads last month
- 1
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
π
Ask for provider support