Text Generation
Transformers
Safetensors
PyTorch
llama
facebook
meta
llama-3
conversational
text-generation-inference
exl2
Instructions to use ek826/Meta-Llama-3.1-405B-Instruct-4.5bpw-exl2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ek826/Meta-Llama-3.1-405B-Instruct-4.5bpw-exl2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ek826/Meta-Llama-3.1-405B-Instruct-4.5bpw-exl2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ek826/Meta-Llama-3.1-405B-Instruct-4.5bpw-exl2") model = AutoModelForCausalLM.from_pretrained("ek826/Meta-Llama-3.1-405B-Instruct-4.5bpw-exl2", device_map="auto") 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 Settings
- vLLM
How to use ek826/Meta-Llama-3.1-405B-Instruct-4.5bpw-exl2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ek826/Meta-Llama-3.1-405B-Instruct-4.5bpw-exl2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ek826/Meta-Llama-3.1-405B-Instruct-4.5bpw-exl2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ek826/Meta-Llama-3.1-405B-Instruct-4.5bpw-exl2
- SGLang
How to use ek826/Meta-Llama-3.1-405B-Instruct-4.5bpw-exl2 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 "ek826/Meta-Llama-3.1-405B-Instruct-4.5bpw-exl2" \ --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": "ek826/Meta-Llama-3.1-405B-Instruct-4.5bpw-exl2", "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 "ek826/Meta-Llama-3.1-405B-Instruct-4.5bpw-exl2" \ --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": "ek826/Meta-Llama-3.1-405B-Instruct-4.5bpw-exl2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ek826/Meta-Llama-3.1-405B-Instruct-4.5bpw-exl2 with Docker Model Runner:
docker model run hf.co/ek826/Meta-Llama-3.1-405B-Instruct-4.5bpw-exl2
Update README.md
Browse files
README.md
CHANGED
|
@@ -189,6 +189,15 @@ extra_gated_description: The information you provide will be collected, stored,
|
|
| 189 |
extra_gated_button_content: Submit
|
| 190 |
---
|
| 191 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 192 |
## Model Information
|
| 193 |
|
| 194 |
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.
|
|
|
|
| 189 |
extra_gated_button_content: Submit
|
| 190 |
---
|
| 191 |
|
| 192 |
+
## EXL2 Quantization
|
| 193 |
+
|
| 194 |
+
This is a 4.5bpw, h6 exl2 quant of the Llama 3.1 model. Big thanks to turboderp and grimulkan for their assistance.
|
| 195 |
+
measurements.json is also included for those that want to make their own quants. By utilizing these quants, you agree to abide by the terms and conditions of the original model.
|
| 196 |
+
|
| 197 |
+
Compute for this quantization provided under the NSF NAIRR Pilot program under resource allocation, NAIRR240051 - Neuro-inspired Oversight for Safe and Trustworthy Large Language Models
|
| 198 |
+
|
| 199 |
+
For more information about the NAIRR pilot, see https://nairrpilot.org/
|
| 200 |
+
|
| 201 |
## Model Information
|
| 202 |
|
| 203 |
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.
|