Run this model with HF Jobs
Run iamabhayaditya/EfficientMath-AI on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/iamabhayaditya/EfficientMath-AI. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/iamabhayaditya/EfficientMath-AI on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/iamabhayaditya/EfficientMath-AI. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/iamabhayaditya/EfficientMath-AI. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use iamabhayaditya/EfficientMath-AI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use iamabhayaditya/EfficientMath-AI with PEFT:
Task type is invalid.
- Transformers
How to use iamabhayaditya/EfficientMath-AI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="iamabhayaditya/EfficientMath-AI")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("iamabhayaditya/EfficientMath-AI") model = AutoModelForCausalLM.from_pretrained("iamabhayaditya/EfficientMath-AI", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use iamabhayaditya/EfficientMath-AI with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf iamabhayaditya/EfficientMath-AI:Q4_K_M # Run inference directly in the terminal: llama cli -hf iamabhayaditya/EfficientMath-AI:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf iamabhayaditya/EfficientMath-AI:Q4_K_M # Run inference directly in the terminal: llama cli -hf iamabhayaditya/EfficientMath-AI:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf iamabhayaditya/EfficientMath-AI:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf iamabhayaditya/EfficientMath-AI:Q4_K_M
Use Docker
docker model run hf.co/iamabhayaditya/EfficientMath-AI:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use iamabhayaditya/EfficientMath-AI with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "iamabhayaditya/EfficientMath-AI" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "iamabhayaditya/EfficientMath-AI", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/iamabhayaditya/EfficientMath-AI:Q4_K_M
- SGLang
How to use iamabhayaditya/EfficientMath-AI with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "iamabhayaditya/EfficientMath-AI" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "iamabhayaditya/EfficientMath-AI", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "iamabhayaditya/EfficientMath-AI" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "iamabhayaditya/EfficientMath-AI", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use iamabhayaditya/EfficientMath-AI with Ollama:
ollama run hf.co/iamabhayaditya/EfficientMath-AI:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use iamabhayaditya/EfficientMath-AI with Docker Model Runner:
docker model run hf.co/iamabhayaditya/EfficientMath-AI:Q4_K_M
- Lemonade
How to use iamabhayaditya/EfficientMath-AI with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull iamabhayaditya/EfficientMath-AI:Q4_K_M
Run and chat with the model
lemonade run user.EfficientMath-AI-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Update README.md
Browse files1234567891011121314151617181920---tags:- gguf- llama.cpp- unsloth---# EfficientMath-AI : GGUFThis model was finetuned and converted to GGUF format using [Unsloth](https://github.com/unslothai/unsloth).**Example usage**:- For text only LLMs: `llama-cli -hf iamabhayaditya/EfficientMath-AI --jinja`- For multimodal models: `llama-mtmd-cli -hf iamabhayaditya/EfficientMath-AI --jinja`## Available Model files:- `Meta-Llama-3.1-8B.Q4_K_M.gguf`This was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth)[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667---base_model: meta-llama/Meta-Llama-3.1-8Blibrary_name: peftlicense: llama3.1datasets:- openai/gsm8klanguage:- enmetrics:- accuracy- perplexitypipeline_tag: text-generationtags:- gguf- llama.cpp- unsloth- transformers- math- lora- custom-instruction---# 🧮 EfficientMath-AI (Llama 3.1 8B)## 📌 Project OverviewEfficientMath-AI is a parameter-efficient fine-tuned (PEFT) version of Meta's **Llama-3.1-8B**, specifically optimized to solve multi-step, grade-school math word problems. It was trained using LoRA (Low-Rank Adaptation) and compressed into a 4-bit quantized GGUF format, allowing it to perform high-level mathematical reasoning efficiently on standard CPU hardware.**Creator:** Abhay Aditya**Live Interactive Demo:** [EfficientMath-AI Web App](https://huggingface.co/spaces/iamabhayaditya/EfficientMath-AI)## 🧠 Model Details* **Base Model:** `meta-llama/Meta-Llama-3.1-8B`* **Fine-Tuning Method:** LoRA (Rank = 16, Alpha = 16) via Unsloth* **Dataset:** GSM8K (Grade School Math 8K)* **Quantization:** `Q4_K_M` (4-bit GGUF)* **Parameters:** 8 Billion* **Deployment Context:** Designed for high-speed, CPU-only inference via `llama.cpp`.## 📊 Evaluation & PerformanceThe model was evaluated against a rigorous test split of the GSM8K dataset, focusing on strict numeric extraction and step-by-step reasoning coherence.* **Overall Accuracy:** 66%* **Training Hardware:** Single NVIDIA T4 GPU (Free Tier)* **Inference Hardware Requirement:** ~8GB RAM (Basic CPU)### Diagnostic Insights:1. **Perplexity:** The model exhibits a tightly clustered, low perplexity distribution (between 2.5 and 4.0), demonstrating high confidence and fluency in generating mathematical syntax.2. **Complexity Ceiling:** The model achieves near 80% accuracy on short word problems, maintaining a concise and highly accurate "Chain of Thought" without hallucinating verbose responses. Like many 8B class models, accuracy scales inversely with prompt length on highly complex, multi-paragraph logic puzzles.## 💻 Usage Example (Python)If you wish to run this model locally, you can use `llama-cpp-python`:```pythonfrom llama_cpp import Llamallm = Llama(model_path="Meta-Llama-3.1-8B.Q4_K_M.gguf",n_ctx=2048,n_threads=4)output = llm("Below is a math word problem. Solve it step by step and provide the final answer.\n\n### Problem:\nIf the cost of 18 apples is 90 rupees, what is the cost of 24 apples?\n\n### Solution:\n",max_tokens=256,temperature=0.2,stop=["<|eot_id|>"])print(output["choices"][0]["text"])
README.md+60-13