Instructions to use ValiantLabs/Llama3-70B-Fireplace with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ValiantLabs/Llama3-70B-Fireplace with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ValiantLabs/Llama3-70B-Fireplace") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ValiantLabs/Llama3-70B-Fireplace") model = AutoModelForCausalLM.from_pretrained("ValiantLabs/Llama3-70B-Fireplace") 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
- vLLM
How to use ValiantLabs/Llama3-70B-Fireplace with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ValiantLabs/Llama3-70B-Fireplace" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ValiantLabs/Llama3-70B-Fireplace", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ValiantLabs/Llama3-70B-Fireplace
- SGLang
How to use ValiantLabs/Llama3-70B-Fireplace 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 "ValiantLabs/Llama3-70B-Fireplace" \ --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": "ValiantLabs/Llama3-70B-Fireplace", "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 "ValiantLabs/Llama3-70B-Fireplace" \ --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": "ValiantLabs/Llama3-70B-Fireplace", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ValiantLabs/Llama3-70B-Fireplace with Docker Model Runner:
docker model run hf.co/ValiantLabs/Llama3-70B-Fireplace
Click here to support our open-source dataset and model releases!
Fireplace is a function-calling model for Llama 3 70b Instruct.
- combines function-calling abilities with a high-performance, versatile chat model
- system message function-calling utilizing the Llama 3 Instruct format
This version of Fireplace focuses on combining chat-instruct and system-message function-calling only.
We've just released Fireplace 2 for Llama 3.1 8b, which includes inline function calls as one of several technical skills (including JSON, SQL, and more!) Try it today!
Version
This is the 2024-05-09 release of Fireplace for Llama 3 70b.
We've also released Fireplace 2 for Llama 3.1 8b and we're working on more Fireplace releases to come :)
Prompting Guide
Fireplace uses the Llama 3 Instruct prompt format:
<|begin_of_text|><|start_header_id|>system<|end_header_id|>{{ system_prompt }}<|eot_id|><|start_header_id|>user<|end_header_id|>{{ user_msg_1 }}<|eot_id|><|start_header_id|>assistant<|end_header_id|>{{ model_answer_1 }}<|eot_id|>
Example input for function calling:
<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n You are Fireplace, an expert code assistant with access to the following functions. Use them if required - { "name": "calculate_tip", "description": "Calculate the tip amount for a bill", "parameters": { "type": "object", "properties": { "bill_amount": { "type": "number", "description": "The total amount of the bill" }, "tip_percentage": { "type": "number", "description": "The percentage of tip to be given" } }, "required": [ "bill_amount", "tip_percentage" ] } } { "name": "check_website_availability", "description": "Check the availability of a website", "parameters": { "type": "object", "properties": { "url": { "type": "string", "description": "The URL of the website" } }, "required": [ "url" ] } } <|eot_id|><|start_header_id|>user<|end_header_id|>\n\nHi, I need help with calculating a tip. My bill is $100 and I want to leave a 30% tip. <|eot_id|><|start_header_id|>assistant<|end_header_id|>
For assistant handling of function responses, deliver them in a new user message:
<|start_header_id|>user<|end_header_id|>\n\n FUNCTION RESPONSE: {"status": "success", "message": "Email has been sent successfully"} <|eot_id|>
WARNING: text-generation-webui
When using Llama 3 Instruct models (including Fireplace) with text-generation-webui note that a current bug in webui can result in incorrect reading of the model's ending tokens, causing unfinished outputs and incorrect structure.
For a temporary workaround if you encounter this issue, edit Fireplace's tokenizer_config file as indicated:
from "eos_token": "<|end_of_text|>",
to "eos_token": "<|eot_id|>",
The Model
Fireplace is built on top of Llama 3 70b Instruct, the highest performance open-source model currently available.
This version of Fireplace uses the glaiveai/glaive-function-calling-v2 dataset converted to Llama 3 Instruct format.
Open LLM Leaderboard Evaluation Results
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 36.82 |
| IFEval (0-Shot) | 77.74 |
| BBH (3-Shot) | 49.56 |
| MATH Lvl 5 (4-Shot) | 19.64 |
| GPQA (0-shot) | 13.98 |
| MuSR (0-shot) | 16.77 |
| MMLU-PRO (5-shot) | 43.25 |
Fireplace is created by Valiant Labs.
Check out our HuggingFace page for Shining Valiant 2 and our other models!
We care about open source. For everyone to use.
We encourage others to finetune further from our models.
- Downloads last month
- 8,336
Model tree for ValiantLabs/Llama3-70B-Fireplace
Collection including ValiantLabs/Llama3-70B-Fireplace
Evaluation results
- strict accuracy on IFEval (0-Shot)Open LLM Leaderboard77.740
- normalized accuracy on BBH (3-Shot)Open LLM Leaderboard49.560
- exact match on MATH Lvl 5 (4-Shot)Open LLM Leaderboard19.640
- acc_norm on GPQA (0-shot)Open LLM Leaderboard13.980
- acc_norm on MuSR (0-shot)Open LLM Leaderboard16.770
- accuracy on MMLU-PRO (5-shot)test set Open LLM Leaderboard43.250

