Instructions to use abacusai/Fewshot-Metamath-OrcaVicuna-Mistral with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use abacusai/Fewshot-Metamath-OrcaVicuna-Mistral with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="abacusai/Fewshot-Metamath-OrcaVicuna-Mistral") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("abacusai/Fewshot-Metamath-OrcaVicuna-Mistral") model = AutoModelForCausalLM.from_pretrained("abacusai/Fewshot-Metamath-OrcaVicuna-Mistral") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use abacusai/Fewshot-Metamath-OrcaVicuna-Mistral with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "abacusai/Fewshot-Metamath-OrcaVicuna-Mistral" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abacusai/Fewshot-Metamath-OrcaVicuna-Mistral", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/abacusai/Fewshot-Metamath-OrcaVicuna-Mistral
- SGLang
How to use abacusai/Fewshot-Metamath-OrcaVicuna-Mistral 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 "abacusai/Fewshot-Metamath-OrcaVicuna-Mistral" \ --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": "abacusai/Fewshot-Metamath-OrcaVicuna-Mistral", "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 "abacusai/Fewshot-Metamath-OrcaVicuna-Mistral" \ --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": "abacusai/Fewshot-Metamath-OrcaVicuna-Mistral", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use abacusai/Fewshot-Metamath-OrcaVicuna-Mistral with Docker Model Runner:
docker model run hf.co/abacusai/Fewshot-Metamath-OrcaVicuna-Mistral
This model was trained on our MetamathFewshot dataset, as well as the Vicuna dataset and the OrcaChat dataset.
It has been finetuned from base Mistral 7B
Usage
This model uses a specific prompt format which is encoded as a chat template. To apply this, you can use the tokenizer.apply_chat_template() method of the attached tokenizer:
messages = [
{"role": "user", "content": "What is the capital of Spain?"},
{"role": "assistant", "content": "The capital of Spain is Madrid."}
]
gen_input = tokenizer.apply_chat_template(message, return_tensors="pt")
model.generate(**gen_input)
Evaluation Results
HuggingFace Leaderboard
| Average | ARC | HellaSwag | MMLU | TruthfulQA | Winogrande | GSM8K |
|---|---|---|---|---|---|---|
| 67.33 | 59.64 | 81.82 | 61.69 | 53.23 | 78.45 | 69.14 |
For comparison the GSM8K score for the original metamath/MetaMath-Mistral-7B was 68.84 and average score was 65.78.
MT-Bench
| Turn 1 | Turn 2 | Average |
|---|---|---|
| 6.90 | 6.52 | 6.71 |
Training Details
Instruction tuned with the following parameters:
- LORA, Rank 8, Alpha 16, Dropout 0.05, all modules (QKV and MLP)
- 3 epochs
- Micro Batch Size 32 over 4xH100, gradient accumulation steps = 1
- AdamW with learning rate 5e-5
Bias, Risks, and Limitations
The model has not been evaluated for safety and is only intended for research and experiments.
- Downloads last month
- 14
Model tree for abacusai/Fewshot-Metamath-OrcaVicuna-Mistral
Base model
mistralai/Mistral-7B-v0.1