Text Generation
Transformers
Safetensors
PyTorch
Japanese
English
llama
llama-3
llama-3.1
autoawq
meta
conversational
text-generation-inference
4-bit precision
awq
Instructions to use kishizaki-sci/Llama-3.1-405B-Instruct-AWQ-4bit-JP-EN with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kishizaki-sci/Llama-3.1-405B-Instruct-AWQ-4bit-JP-EN with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kishizaki-sci/Llama-3.1-405B-Instruct-AWQ-4bit-JP-EN") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kishizaki-sci/Llama-3.1-405B-Instruct-AWQ-4bit-JP-EN") model = AutoModelForCausalLM.from_pretrained("kishizaki-sci/Llama-3.1-405B-Instruct-AWQ-4bit-JP-EN", 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 kishizaki-sci/Llama-3.1-405B-Instruct-AWQ-4bit-JP-EN with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kishizaki-sci/Llama-3.1-405B-Instruct-AWQ-4bit-JP-EN" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kishizaki-sci/Llama-3.1-405B-Instruct-AWQ-4bit-JP-EN", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kishizaki-sci/Llama-3.1-405B-Instruct-AWQ-4bit-JP-EN
- SGLang
How to use kishizaki-sci/Llama-3.1-405B-Instruct-AWQ-4bit-JP-EN 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 "kishizaki-sci/Llama-3.1-405B-Instruct-AWQ-4bit-JP-EN" \ --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": "kishizaki-sci/Llama-3.1-405B-Instruct-AWQ-4bit-JP-EN", "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 "kishizaki-sci/Llama-3.1-405B-Instruct-AWQ-4bit-JP-EN" \ --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": "kishizaki-sci/Llama-3.1-405B-Instruct-AWQ-4bit-JP-EN", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use kishizaki-sci/Llama-3.1-405B-Instruct-AWQ-4bit-JP-EN with Docker Model Runner:
docker model run hf.co/kishizaki-sci/Llama-3.1-405B-Instruct-AWQ-4bit-JP-EN
Upload config
Browse files- config.json +13 -0
config.json
CHANGED
|
@@ -23,6 +23,19 @@
|
|
| 23 |
"num_hidden_layers": 126,
|
| 24 |
"num_key_value_heads": 8,
|
| 25 |
"pretraining_tp": 1,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
"rms_norm_eps": 1e-05,
|
| 27 |
"rope_scaling": {
|
| 28 |
"factor": 8.0,
|
|
|
|
| 23 |
"num_hidden_layers": 126,
|
| 24 |
"num_key_value_heads": 8,
|
| 25 |
"pretraining_tp": 1,
|
| 26 |
+
"quantization_config": {
|
| 27 |
+
"backend": "autoawq",
|
| 28 |
+
"bits": 4,
|
| 29 |
+
"do_fuse": false,
|
| 30 |
+
"exllama_config": null,
|
| 31 |
+
"fuse_max_seq_len": null,
|
| 32 |
+
"group_size": 128,
|
| 33 |
+
"modules_to_fuse": null,
|
| 34 |
+
"modules_to_not_convert": null,
|
| 35 |
+
"quant_method": "awq",
|
| 36 |
+
"version": "gemm",
|
| 37 |
+
"zero_point": true
|
| 38 |
+
},
|
| 39 |
"rms_norm_eps": 1e-05,
|
| 40 |
"rope_scaling": {
|
| 41 |
"factor": 8.0,
|