Llama 2: Open Foundation and Fine-Tuned Chat Models
Paper • 2307.09288 • Published • 252
How to use taesunwhang/vicuna-metamath-llemma-13b with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="taesunwhang/vicuna-metamath-llemma-13b") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("taesunwhang/vicuna-metamath-llemma-13b")
model = AutoModelForCausalLM.from_pretrained("taesunwhang/vicuna-metamath-llemma-13b", device_map="auto")How to use taesunwhang/vicuna-metamath-llemma-13b with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "taesunwhang/vicuna-metamath-llemma-13b"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "taesunwhang/vicuna-metamath-llemma-13b",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/taesunwhang/vicuna-metamath-llemma-13b
How to use taesunwhang/vicuna-metamath-llemma-13b with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "taesunwhang/vicuna-metamath-llemma-13b" \
--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": "taesunwhang/vicuna-metamath-llemma-13b",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "taesunwhang/vicuna-metamath-llemma-13b" \
--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": "taesunwhang/vicuna-metamath-llemma-13b",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use taesunwhang/vicuna-metamath-llemma-13b with Docker Model Runner:
docker model run hf.co/taesunwhang/vicuna-metamath-llemma-13b
Model merge based on lmsys/vicuna-7b-v1.5 and meta-math/MetaMath-Llemma-7B
Vicuna
Vicuna is a chat assistant trained by fine-tuning Llama 2 on user-shared conversations collected from ShareGPT.
MetaMath Llemma
MetaMath-Llemma-7B is fully fine-tuned on the MetaMathQA datasets and based on the powerful Llemma-7B model. It is glad to see using MetaMathQA datasets and change the base model from llama-2-7B to Llemma-7B can boost the MATH performance from 19.8 to 30.0.