Instructions to use QuantFactory/MAmmoTH2-8B-Plus-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantFactory/MAmmoTH2-8B-Plus-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantFactory/MAmmoTH2-8B-Plus-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QuantFactory/MAmmoTH2-8B-Plus-GGUF", dtype="auto") - llama-cpp-python
How to use QuantFactory/MAmmoTH2-8B-Plus-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/MAmmoTH2-8B-Plus-GGUF", filename="MAmmoTH2-8B-Plus.Q2_K.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use QuantFactory/MAmmoTH2-8B-Plus-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/MAmmoTH2-8B-Plus-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/MAmmoTH2-8B-Plus-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/MAmmoTH2-8B-Plus-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/MAmmoTH2-8B-Plus-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf QuantFactory/MAmmoTH2-8B-Plus-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/MAmmoTH2-8B-Plus-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf QuantFactory/MAmmoTH2-8B-Plus-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/MAmmoTH2-8B-Plus-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/MAmmoTH2-8B-Plus-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use QuantFactory/MAmmoTH2-8B-Plus-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantFactory/MAmmoTH2-8B-Plus-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/MAmmoTH2-8B-Plus-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantFactory/MAmmoTH2-8B-Plus-GGUF:Q4_K_M
- SGLang
How to use QuantFactory/MAmmoTH2-8B-Plus-GGUF 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 "QuantFactory/MAmmoTH2-8B-Plus-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/MAmmoTH2-8B-Plus-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "QuantFactory/MAmmoTH2-8B-Plus-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/MAmmoTH2-8B-Plus-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use QuantFactory/MAmmoTH2-8B-Plus-GGUF with Ollama:
ollama run hf.co/QuantFactory/MAmmoTH2-8B-Plus-GGUF:Q4_K_M
- Unsloth Studio new
How to use QuantFactory/MAmmoTH2-8B-Plus-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/MAmmoTH2-8B-Plus-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/MAmmoTH2-8B-Plus-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/MAmmoTH2-8B-Plus-GGUF to start chatting
- Docker Model Runner
How to use QuantFactory/MAmmoTH2-8B-Plus-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/MAmmoTH2-8B-Plus-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/MAmmoTH2-8B-Plus-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/MAmmoTH2-8B-Plus-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.MAmmoTH2-8B-Plus-GGUF-Q4_K_M
List all available models
lemonade list
🦣 QuantFactory/MAmmoTH2-8B-Plus-GGUF
This is quantized version of TIGER-Lab/MAmmoTH2-8B-Plus created using llama.cpp
Introduction
Project Page: https://tiger-ai-lab.github.io/MAmmoTH2/
Paper: https://arxiv.org/pdf/2405.03548
Code: https://github.com/TIGER-AI-Lab/MAmmoTH2
Introducing 🦣 MAmmoTH2, a game-changer in improving the reasoning abilities of large language models (LLMs) through innovative instruction tuning. By efficiently harvesting 10 million instruction-response pairs from the pre-training web corpus, we've developed MAmmoTH2 models that significantly boost performance on reasoning benchmarks. For instance, MAmmoTH2-7B (Mistral) sees its performance soar from 11% to 36.7% on MATH and from 36% to 68.4% on GSM8K, all without training on any domain-specific data. Further training on public instruction tuning datasets yields MAmmoTH2-Plus, setting new standards in reasoning and chatbot benchmarks. Our work presents a cost-effective approach to acquiring large-scale, high-quality instruction data, offering a fresh perspective on enhancing LLM reasoning abilities.
| Base Model | MAmmoTH2 | MAmmoTH2-Plus | |
|---|---|---|---|
| 7B | Mistral | 🦣 MAmmoTH2-7B | 🦣 MAmmoTH2-7B-Plus |
| 8B | Llama-3 | 🦣 MAmmoTH2-8B | 🦣 MAmmoTH2-8B-Plus |
| 8x7B | Mixtral | 🦣 MAmmoTH2-8x7B | 🦣 MAmmoTH2-8x7B-Plus |
Training Data
Please refer to https://huggingface.co/datasets/TIGER-Lab/WebInstructSub for more details.
Training Procedure
The models are fine-tuned with the WEBINSTRUCT dataset using the original Llama-3, Mistral and Mistal models as base models. The training procedure varies for different models based on their sizes. Check out our paper for more details.
Evaluation
The models are evaluated using open-ended and multiple-choice math problems from several datasets. Here are the results:
| Model | TheoremQA | MATH | GSM8K | GPQA | MMLU-ST | BBH | ARC-C | Avg |
|---|---|---|---|---|---|---|---|---|
| MAmmoTH2-7B (Updated) | 29.0 | 36.7 | 68.4 | 32.4 | 62.4 | 58.6 | 81.7 | 52.7 |
| MAmmoTH2-8B (Updated) | 30.3 | 35.8 | 70.4 | 35.2 | 64.2 | 62.1 | 82.2 | 54.3 |
| MAmmoTH2-8x7B | 32.2 | 39.0 | 75.4 | 36.8 | 67.4 | 71.1 | 87.5 | 58.9 |
| MAmmoTH2-7B-Plus (Updated) | 31.2 | 46.0 | 84.6 | 33.8 | 63.8 | 63.3 | 84.4 | 58.1 |
| MAmmoTH2-8B-Plus (Updated) | 31.5 | 43.0 | 85.2 | 35.8 | 66.7 | 69.7 | 84.3 | 59.4 |
| MAmmoTH2-8x7B-Plus | 34.1 | 47.0 | 86.4 | 37.8 | 72.4 | 74.1 | 88.4 | 62.9 |
To reproduce our results, please refer to https://github.com/TIGER-AI-Lab/MAmmoTH2/tree/main/math_eval.
Usage
You can use the models through Huggingface's Transformers library. Use the pipeline function to create a text-generation pipeline with the model of your choice, then feed in a math problem to get the solution. Check our Github repo for more advanced use: https://github.com/TIGER-AI-Lab/MAmmoTH2
Limitations
We've tried our best to build math generalist models. However, we acknowledge that the models' performance may vary based on the complexity and specifics of the math problem. Still not all mathematical fields can be covered comprehensively.
- Downloads last month
- 234
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
Model tree for QuantFactory/MAmmoTH2-8B-Plus-GGUF
Base model
TIGER-Lab/MAmmoTH2-8B-Plus