Text Generation
Transformers
PyTorch
Safetensors
English
mistral
text-generation-inference
unsloth
trl
Instructions to use EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos") model = AutoModelForCausalLM.from_pretrained("EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos
- SGLang
How to use EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos 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 "EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos" \ --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": "EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos" \ --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": "EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Studio
How to use EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos 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 EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos 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 EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos", max_seq_length=2048, ) - Docker Model Runner
How to use EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos with Docker Model Runner:
docker model run hf.co/EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos
Update README.md
Browse files
README.md
CHANGED
|
@@ -41,6 +41,40 @@ Mistral Nemo is a transformer model, with the following architecture choices:
|
|
| 41 |
- **Vocabulary size:** 2**17 ~= 128k
|
| 42 |
- **Rotary embeddings (theta = 1M)**
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
# Uploaded model
|
| 46 |
|
|
|
|
| 41 |
- **Vocabulary size:** 2**17 ~= 128k
|
| 42 |
- **Rotary embeddings (theta = 1M)**
|
| 43 |
|
| 44 |
+
### Mistral Inference
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
#### Install
|
| 48 |
+
|
| 49 |
+
It is recommended to use `mistralai/Mistral-Nemo-Base-2407` with [mistral-inference](https://github.com/mistralai/mistral-inference).
|
| 50 |
+
For HF transformers code snippets, please keep scrolling.
|
| 51 |
+
|
| 52 |
+
```
|
| 53 |
+
pip install mistral_inference
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
### Transformers
|
| 57 |
+
|
| 58 |
+
> [!IMPORTANT]
|
| 59 |
+
> NOTE: Until a new release has been made, you need to install transformers from source:
|
| 60 |
+
> ```sh
|
| 61 |
+
> pip install git+https://github.com/huggingface/transformers.git
|
| 62 |
+
> ```
|
| 63 |
+
|
| 64 |
+
If you want to use Hugging Face `transformers` to generate text, you can do something like this.
|
| 65 |
+
|
| 66 |
+
```py
|
| 67 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 68 |
+
model_id = "EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos"
|
| 69 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 70 |
+
model = AutoModelForCausalLM.from_pretrained(model_id)
|
| 71 |
+
inputs = tokenizer("Hello my name is", return_tensors="pt")
|
| 72 |
+
outputs = model.generate(**inputs, max_new_tokens=20)
|
| 73 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
> [!TIP]
|
| 77 |
+
> Unlike previous Mistral models, Mistral Nemo requires smaller temperatures. We recommend to use a temperature of 0.3.
|
| 78 |
|
| 79 |
# Uploaded model
|
| 80 |
|