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

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
Safetensors
Model size
2B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support