Text Generation
Transformers
Safetensors
mistral
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use LLMSafety/Mistral-Nemo-Base-2407-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LLMSafety/Mistral-Nemo-Base-2407-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LLMSafety/Mistral-Nemo-Base-2407-4bit")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LLMSafety/Mistral-Nemo-Base-2407-4bit") model = AutoModelForCausalLM.from_pretrained("LLMSafety/Mistral-Nemo-Base-2407-4bit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LLMSafety/Mistral-Nemo-Base-2407-4bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LLMSafety/Mistral-Nemo-Base-2407-4bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LLMSafety/Mistral-Nemo-Base-2407-4bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LLMSafety/Mistral-Nemo-Base-2407-4bit
- SGLang
How to use LLMSafety/Mistral-Nemo-Base-2407-4bit 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 "LLMSafety/Mistral-Nemo-Base-2407-4bit" \ --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": "LLMSafety/Mistral-Nemo-Base-2407-4bit", "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 "LLMSafety/Mistral-Nemo-Base-2407-4bit" \ --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": "LLMSafety/Mistral-Nemo-Base-2407-4bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LLMSafety/Mistral-Nemo-Base-2407-4bit with Docker Model Runner:
docker model run hf.co/LLMSafety/Mistral-Nemo-Base-2407-4bit
Download tokenizer.json from LLMSafety/Mistral-Nemo-Base-2407-4bit: direct link, hf CLI and curl.
- Browser
- Download file 17.1 MB
-
https://huggingface.co/LLMSafety/Mistral-Nemo-Base-2407-4bit/resolve/main/tokenizer.json
- Command line
-
hf download hf://LLMSafety/Mistral-Nemo-Base-2407-4bit/tokenizer.json
-
curl -L -o tokenizer.json https://huggingface.co/LLMSafety/Mistral-Nemo-Base-2407-4bit/resolve/main/tokenizer.json
17.1 MB
- Xet hash:
- 183feaf3854ea652c1087520f20fdc39282f652edf10541e6904a3d3f975425e
- Size of remote file:
- 17.1 MB
- SHA256:
- b0240ce510f08e6c2041724e9043e33be9d251d1e4a4d94eb68cd47b954b61d2
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.