You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

๐Ÿงฎ Qwen Math Assistant

A powerful AI-powered mathematical problem solver built with Qwen language model and deployed on Hugging Face Spaces.

๐Ÿš€ Features

  • Step-by-step Solutions: Get detailed explanations for mathematical problems
  • Wide Range of Topics: Algebra, calculus, geometry, trigonometry, and more
  • Interactive Interface: Clean and intuitive Gradio-powered chat interface
  • Real-time Processing: Fast response times with optimized model loading
  • Example Problems: Quick-start with pre-loaded example questions

๐ŸŽฏ Supported Math Topics

  • โœ… Algebra: Linear equations, quadratic equations, polynomial operations
  • โœ… Calculus: Derivatives, integrals, limits
  • โœ… Geometry: Area, volume, perimeter calculations
  • โœ… Trigonometry: Sin, cos, tan functions and identities
  • โœ… Statistics: Basic statistical calculations
  • โœ… Number Theory: Prime numbers, factorization

๐Ÿ› ๏ธ How to Use

  1. Load the Model: Click the "๐Ÿš€ Load Model" button to initialize the AI assistant
  2. Ask Questions: Type your math problem in the text box
  3. Get Solutions: Receive step-by-step explanations and answers
  4. Try Examples: Click on example problems to get started quickly

Example Queries:

  • "Solve: 2x + 5 = 15"
  • "What is the derivative of xยฒ + 3x - 2?"
  • "Factor: xยฒ - 9"
  • "Calculate the area of a circle with radius 5"

๐Ÿ—๏ธ Technical Details

Model Architecture

  • Base Model: Qwen2.5-0.5B (optimized for Hugging Face Spaces)
  • Framework: Transformers, PyTorch
  • Interface: Gradio
  • Deployment: Hugging Face Spaces

Performance Optimizations

  • Efficient memory usage with low_cpu_mem_usage=True
  • Dynamic device mapping for GPU/CPU compatibility
  • Optimized tokenization with proper padding handling
  • Response caching for better performance

๐Ÿ“‹ Requirements

  • Python 3.8+
  • PyTorch 2.0+
  • Transformers 4.35+
  • Gradio 4.0+
  • PEFT 0.6+

๐Ÿš€ Deployment

Local Setup

git clone <your-repo>
cd qwen-math-assistant
pip install -r requirements.txt
python app.py

Hugging Face Spaces

  1. Create a new Space on Hugging Face
  2. Upload app.py and requirements.txt
  3. Set the SDK to "gradio"
  4. The Space will automatically build and deploy

๐Ÿ”ง Configuration

The application includes several configurable parameters:

  • Max Response Length: Adjustable slider (50-500 tokens)
  • Temperature: Set to 0.7 for balanced creativity/accuracy
  • Top-p Sampling: 0.9 for diverse but relevant responses

๐Ÿ“ License

This project is open source and available under the MIT License.

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

๐Ÿ“ž Support

For questions or support, please open an issue in the repository or contact the maintainers.


Note: This application uses the Qwen language model. Please ensure you comply with the model's usage terms and conditions.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Dataset used to train simmonsc/qwen-lm