Instructions to use QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF 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 QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-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/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-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/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF with Ollama:
ollama run hf.co/QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF:Q4_K_M
- Unsloth Studio
How to use QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-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/Fireball-Meta-Llama-3.1-8B-Instruct-Math-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/Fireball-Meta-Llama-3.1-8B-Instruct-Math-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/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF to start chatting
- Pi
How to use QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health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|
+
|
| 2 |
+
---
|
| 3 |
+
|
| 4 |
+
base_model: unsloth/meta-llama-3.1-8b-instruct-bnb-4bit
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
license: apache-2.0
|
| 8 |
+
tags:
|
| 9 |
+
- text-generation-inference
|
| 10 |
+
- transformers
|
| 11 |
+
- unsloth
|
| 12 |
+
- llama
|
| 13 |
+
- trl
|
| 14 |
+
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
[](https://hf.co/QuantFactory)
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
# QuantFactory/Fireball-Meta-Llama-3.1-8B-Instruct-Math-GGUF
|
| 21 |
+
This is quantized version of [EpistemeAI/Fireball-Meta-Llama-3.1-8B-Instruct-Math](https://huggingface.co/EpistemeAI/Fireball-Meta-Llama-3.1-8B-Instruct-Math) created using llama.cpp
|
| 22 |
+
|
| 23 |
+
# Original Model Card
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
# Introducting Fireball-Llama-3.1-8B Philos Math
|
| 27 |
+
|
| 28 |
+
This Fireball Llama 3.1 8B was fine tune by relatively similar to gsm8k dataset.
|
| 29 |
+
|
| 30 |
+
# Original Model card:
|
| 31 |
+
## Model Information
|
| 32 |
+
|
| 33 |
+
The Meta Llama 3.1 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction tuned generative models in 8B, 70B and 405B sizes (text in/text out). The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks.
|
| 34 |
+
|
| 35 |
+
**Model developer**: Meta
|
| 36 |
+
|
| 37 |
+
**Model Architecture:** Llama 3.1 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety.
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
<table>
|
| 41 |
+
<tr>
|
| 42 |
+
<td>
|
| 43 |
+
</td>
|
| 44 |
+
<td><strong>Training Data</strong>
|
| 45 |
+
</td>
|
| 46 |
+
<td><strong>Params</strong>
|
| 47 |
+
</td>
|
| 48 |
+
<td><strong>Input modalities</strong>
|
| 49 |
+
</td>
|
| 50 |
+
<td><strong>Output modalities</strong>
|
| 51 |
+
</td>
|
| 52 |
+
<td><strong>Context length</strong>
|
| 53 |
+
</td>
|
| 54 |
+
<td><strong>GQA</strong>
|
| 55 |
+
</td>
|
| 56 |
+
<td><strong>Token count</strong>
|
| 57 |
+
</td>
|
| 58 |
+
<td><strong>Knowledge cutoff</strong>
|
| 59 |
+
</td>
|
| 60 |
+
</tr>
|
| 61 |
+
<tr>
|
| 62 |
+
<td rowspan="3" >Llama 3.1 (text only)
|
| 63 |
+
</td>
|
| 64 |
+
<td rowspan="3" >A new mix of publicly available online data.
|
| 65 |
+
</td>
|
| 66 |
+
<td>8B
|
| 67 |
+
</td>
|
| 68 |
+
<td>Multilingual Text
|
| 69 |
+
</td>
|
| 70 |
+
<td>Multilingual Text and code
|
| 71 |
+
</td>
|
| 72 |
+
<td>128k
|
| 73 |
+
</td>
|
| 74 |
+
<td>Yes
|
| 75 |
+
</td>
|
| 76 |
+
<td rowspan="3" >15T+
|
| 77 |
+
</td>
|
| 78 |
+
<td rowspan="3" >December 2023
|
| 79 |
+
</td>
|
| 80 |
+
</tr>
|
| 81 |
+
<tr>
|
| 82 |
+
<td>70B
|
| 83 |
+
</td>
|
| 84 |
+
<td>Multilingual Text
|
| 85 |
+
</td>
|
| 86 |
+
<td>Multilingual Text and code
|
| 87 |
+
</td>
|
| 88 |
+
<td>128k
|
| 89 |
+
</td>
|
| 90 |
+
<td>Yes
|
| 91 |
+
</td>
|
| 92 |
+
</tr>
|
| 93 |
+
<tr>
|
| 94 |
+
<td>405B
|
| 95 |
+
</td>
|
| 96 |
+
<td>Multilingual Text
|
| 97 |
+
</td>
|
| 98 |
+
<td>Multilingual Text and code
|
| 99 |
+
</td>
|
| 100 |
+
<td>128k
|
| 101 |
+
</td>
|
| 102 |
+
<td>Yes
|
| 103 |
+
</td>
|
| 104 |
+
</tr>
|
| 105 |
+
</table>
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
**Supported languages:** English, German, French, Italian, Portuguese, Hindi, Spanish, and Thai.
|
| 109 |
+
|
| 110 |
+
**Llama 3.1 family of models**. Token counts refer to pretraining data only. All model versions use Grouped-Query Attention (GQA) for improved inference scalability.
|
| 111 |
+
|
| 112 |
+
**Model Release Date:** July 23, 2024.
|
| 113 |
+
|
| 114 |
+
**Status:** This is a static model trained on an offline dataset. Future versions of the tuned models will be released as we improve model safety with community feedback.
|
| 115 |
+
|
| 116 |
+
**License:** A custom commercial license, the Llama 3.1 Community License, is available at: [https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE)
|
| 117 |
+
|
| 118 |
+
Where to send questions or comments about the model Instructions on how to provide feedback or comments on the model can be found in the model [README](https://github.com/meta-llama/llama3). For more technical information about generation parameters and recipes for how to use Llama 3.1 in applications, please go [here](https://github.com/meta-llama/llama-recipes).
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
## Intended Use
|
| 122 |
+
|
| 123 |
+
**Intended Use Cases** Llama 3.1 is intended for commercial and research use in multiple languages. Instruction tuned text only models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks. The Llama 3.1 model collection also supports the ability to leverage the outputs of its models to improve other models including synthetic data generation and distillation. The Llama 3.1 Community License allows for these use cases.
|
| 124 |
+
|
| 125 |
+
**Out-of-scope** Use in any manner that violates applicable laws or regulations (including trade compliance laws). Use in any other way that is prohibited by the Acceptable Use Policy and Llama 3.1 Community License. Use in languages beyond those explicitly referenced as supported in this model card**.
|
| 126 |
+
**<span style="text-decoration:underline;">Note</span>: Llama 3.1 has been trained on a broader collection of languages than the 8 supported languages. Developers may fine-tune Llama 3.1 models for languages beyond the 8 supported languages provided they comply with the Llama 3.1 Community License and the Acceptable Use Policy and in such cases are responsible for ensuring that any uses of Llama 3.1 in additional languages is done in a safe and responsible manner.
|
| 127 |
+
|
| 128 |
+
## How to use
|
| 129 |
+
|
| 130 |
+
This repository contains two versions of Meta-Llama-3.1-8B-Instruct, for use with transformers and with the original `llama` codebase.
|
| 131 |
+
|
| 132 |
+
### Use with transformers
|
| 133 |
+
|
| 134 |
+
Starting with `transformers >= 4.43.0` onward, you can run conversational inference using the Transformers `pipeline` abstraction or by leveraging the Auto classes with the `generate()` function.
|
| 135 |
+
|
| 136 |
+
Make sure to update your transformers installation via `pip install --upgrade transformers`.
|
| 137 |
+
|
| 138 |
+
```python
|
| 139 |
+
import transformers
|
| 140 |
+
import torch
|
| 141 |
+
model_id = "EpistemeAI/Fireball-Meta-Llama-3.1-8B-Instruct-Math"
|
| 142 |
+
pipeline = transformers.pipeline(
|
| 143 |
+
"text-generation",
|
| 144 |
+
model=model_id,
|
| 145 |
+
model_kwargs={"torch_dtype": torch.bfloat16},
|
| 146 |
+
device_map="auto",
|
| 147 |
+
)
|
| 148 |
+
messages = [
|
| 149 |
+
{"role": "system", "content": "You are math chatbot who always responds in math!"},
|
| 150 |
+
{"role": "user", "content": "Who are you?"},
|
| 151 |
+
]
|
| 152 |
+
outputs = pipeline(
|
| 153 |
+
messages,
|
| 154 |
+
max_new_tokens=256,
|
| 155 |
+
)
|
| 156 |
+
print(outputs[0]["generated_text"][-1])
|
| 157 |
+
```
|
| 158 |
+
|
| 159 |
+
Note: You can also find detailed recipes on how to use the model locally, with `torch.compile()`, assisted generations, quantised and more at [`huggingface-llama-recipes`](https://github.com/huggingface/huggingface-llama-recipes)
|
| 160 |
+
|
| 161 |
+
### Tool use with transformers
|
| 162 |
+
|
| 163 |
+
LLaMA-3.1 supports multiple tool use formats. You can see a full guide to prompt formatting [here](https://llama.meta.com/docs/model-cards-and-prompt-formats/llama3_1/).
|
| 164 |
+
|
| 165 |
+
Tool use is also supported through [chat templates](https://huggingface.co/docs/transformers/main/chat_templating#advanced-tool-use--function-calling) in Transformers.
|
| 166 |
+
Here is a quick example showing a single simple tool:
|
| 167 |
+
|
| 168 |
+
```python
|
| 169 |
+
# First, define a tool
|
| 170 |
+
def get_current_temperature(location: str) -> float:
|
| 171 |
+
"""
|
| 172 |
+
Get the current temperature at a location.
|
| 173 |
+
|
| 174 |
+
Args:
|
| 175 |
+
location: The location to get the temperature for, in the format "City, Country"
|
| 176 |
+
Returns:
|
| 177 |
+
The current temperature at the specified location in the specified units, as a float.
|
| 178 |
+
"""
|
| 179 |
+
return 22. # A real function should probably actually get the temperature!
|
| 180 |
+
# Next, create a chat and apply the chat template
|
| 181 |
+
messages = [
|
| 182 |
+
{"role": "system", "content": "You are a bot that responds to weather queries."},
|
| 183 |
+
{"role": "user", "content": "Hey, what's the temperature in Paris right now?"}
|
| 184 |
+
]
|
| 185 |
+
inputs = tokenizer.apply_chat_template(messages, tools=[get_current_temperature], add_generation_prompt=True)
|
| 186 |
+
```
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
You can then generate text from this input as normal. If the model generates a tool call, you should add it to the chat like so:
|
| 190 |
+
|
| 191 |
+
```python
|
| 192 |
+
tool_call = {"name": "get_current_temperature", "arguments": {"location": "Paris, France"}}
|
| 193 |
+
messages.append({"role": "assistant", "tool_calls": [{"type": "function", "function": tool_call}]})
|
| 194 |
+
```
|
| 195 |
+
|
| 196 |
+
and then call the tool and append the result, with the `tool` role, like so:
|
| 197 |
+
|
| 198 |
+
```python
|
| 199 |
+
messages.append({"role": "tool", "name": "get_current_temperature", "content": "22.0"})
|
| 200 |
+
```
|
| 201 |
+
|
| 202 |
+
After that, you can `generate()` again to let the model use the tool result in the chat. Note that this was a very brief introduction to tool calling - for more information,
|
| 203 |
+
see the [LLaMA prompt format docs](https://llama.meta.com/docs/model-cards-and-prompt-formats/llama3_1/) and the Transformers [tool use documentation](https://huggingface.co/docs/transformers/main/chat_templating#advanced-tool-use--function-calling).
|
| 204 |
+
|
| 205 |
+
|
| 206 |
+
#### vllm
|
| 207 |
+
|
| 208 |
+
```
|
| 209 |
+
# Install vLLM from pip:
|
| 210 |
+
pip install vllm
|
| 211 |
+
|
| 212 |
+
Load and run the model:
|
| 213 |
+
# Load and run the model:
|
| 214 |
+
vllm serve "EpistemeAI/Fireball-Meta-Llama-3.1-8B-Instruct-Math"
|
| 215 |
+
|
| 216 |
+
# Call the server using curl:
|
| 217 |
+
curl -X POST "http://localhost:8000/v1/chat/completions" \
|
| 218 |
+
-H "Content-Type: application/json" \
|
| 219 |
+
--data '{
|
| 220 |
+
"model": "EpistemeAI/Fireball-Llama-3.1-8B-Philos-Math-v0.1"
|
| 221 |
+
"messages": [
|
| 222 |
+
{"role": "user", "content": "Hello!"}
|
| 223 |
+
]
|
| 224 |
+
}'
|
| 225 |
+
```
|
| 226 |
+
|
| 227 |
+
## Hardware and Software
|
| 228 |
+
|
| 229 |
+
**Training Factors** We used custom training libraries, Meta's custom built GPU cluster, and production infrastructure for pretraining. Fine-tuning, annotation, and evaluation were also performed on production infrastructure.
|
| 230 |
+
|
| 231 |
+
**Training utilized a cumulative of** 39.3M GPU hours of computation on H100-80GB (TDP of 700W) type hardware, per the table below. Training time is the total GPU time required for training each model and power consumption is the peak power capacity per GPU device used, adjusted for power usage efficiency.
|
| 232 |
+
|
| 233 |
+
|
| 234 |
+
**Training Greenhouse Gas Emissions** Estimated total location-based greenhouse gas emissions were **11,390** tons CO2eq for training. Since 2020, Meta has maintained net zero greenhouse gas emissions in its global operations and matched 100% of its electricity use with renewable energy, therefore the total market-based greenhouse gas emissions for training were 0 tons CO2eq.
|
| 235 |
+
|
| 236 |
+
|
| 237 |
+
<table>
|
| 238 |
+
<tr>
|
| 239 |
+
<td>
|
| 240 |
+
</td>
|
| 241 |
+
<td><strong>Training Time (GPU hours)</strong>
|
| 242 |
+
</td>
|
| 243 |
+
<td><strong>Training Power Consumption (W)</strong>
|
| 244 |
+
</td>
|
| 245 |
+
<td><strong>Training Location-Based Greenhouse Gas Emissions</strong>
|
| 246 |
+
<p>
|
| 247 |
+
<strong>(tons CO2eq)</strong>
|
| 248 |
+
</td>
|
| 249 |
+
<td><strong>Training Market-Based Greenhouse Gas Emissions</strong>
|
| 250 |
+
<p>
|
| 251 |
+
<strong>(tons CO2eq)</strong>
|
| 252 |
+
</td>
|
| 253 |
+
</tr>
|
| 254 |
+
<tr>
|
| 255 |
+
<td>Llama 3.1 8B
|
| 256 |
+
</td>
|
| 257 |
+
<td>1.46M
|
| 258 |
+
</td>
|
| 259 |
+
<td>700
|
| 260 |
+
</td>
|
| 261 |
+
<td>420
|
| 262 |
+
</td>
|
| 263 |
+
<td>0
|
| 264 |
+
</td>
|
| 265 |
+
</tr>
|
| 266 |
+
<tr>
|
| 267 |
+
<td>Llama 3.1 70B
|
| 268 |
+
</td>
|
| 269 |
+
<td>7.0M
|
| 270 |
+
</td>
|
| 271 |
+
<td>700
|
| 272 |
+
</td>
|
| 273 |
+
<td>2,040
|
| 274 |
+
</td>
|
| 275 |
+
<td>0
|
| 276 |
+
</td>
|
| 277 |
+
</tr>
|
| 278 |
+
<tr>
|
| 279 |
+
<td>Llama 3.1 405B
|
| 280 |
+
</td>
|
| 281 |
+
<td>30.84M
|
| 282 |
+
</td>
|
| 283 |
+
<td>700
|
| 284 |
+
</td>
|
| 285 |
+
<td>8,930
|
| 286 |
+
</td>
|
| 287 |
+
<td>0
|
| 288 |
+
</td>
|
| 289 |
+
</tr>
|
| 290 |
+
<tr>
|
| 291 |
+
<td>Total
|
| 292 |
+
</td>
|
| 293 |
+
<td>39.3M
|
| 294 |
+
<td>
|
| 295 |
+
<ul>
|
| 296 |
+
|
| 297 |
+
</ul>
|
| 298 |
+
</td>
|
| 299 |
+
<td>11,390
|
| 300 |
+
</td>
|
| 301 |
+
<td>0
|
| 302 |
+
</td>
|
| 303 |
+
</tr>
|
| 304 |
+
</table>
|
| 305 |
+
|
| 306 |
+
|
| 307 |
+
|
| 308 |
+
The methodology used to determine training energy use and greenhouse gas emissions can be found [here](https://arxiv.org/pdf/2204.05149). Since Meta is openly releasing these models, the training energy use and greenhouse gas emissions will not be incurred by others.
|
| 309 |
+
|
| 310 |
+
|
| 311 |
+
## Training Data
|
| 312 |
+
|
| 313 |
+
**Overview:** Llama 3.1 was pretrained on ~15 trillion tokens of data from publicly available sources. The fine-tuning data includes publicly available instruction datasets, as well as over 25M synthetically generated examples.
|
| 314 |
+
|
| 315 |
+
**Data Freshness:** The pretraining data has a cutoff of December 2023.
|
| 316 |
+
|
| 317 |
+
|
| 318 |
+
# Uploaded model
|
| 319 |
+
|
| 320 |
+
- **Developed by:** EpistemeAI
|
| 321 |
+
- **License:** apache-2.0
|
| 322 |
+
- **Finetuned from model :** unsloth/meta-llama-3.1-8b-instruct-bnb-4bit
|
| 323 |
+
|
| 324 |
+
This llama model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
|
| 325 |
+
|
| 326 |
+
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
| 327 |
+
|