Text Generation
Transformers
Safetensors
PyTorch
English
llama
nvidia
chatqa-1.5
chatqa
llama-3
conversational
text-generation-inference
Instructions to use nvidia/Llama3-ChatQA-1.5-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/Llama3-ChatQA-1.5-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nvidia/Llama3-ChatQA-1.5-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nvidia/Llama3-ChatQA-1.5-8B") model = AutoModelForCausalLM.from_pretrained("nvidia/Llama3-ChatQA-1.5-8B", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nvidia/Llama3-ChatQA-1.5-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nvidia/Llama3-ChatQA-1.5-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nvidia/Llama3-ChatQA-1.5-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nvidia/Llama3-ChatQA-1.5-8B
- SGLang
How to use nvidia/Llama3-ChatQA-1.5-8B 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 "nvidia/Llama3-ChatQA-1.5-8B" \ --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": "nvidia/Llama3-ChatQA-1.5-8B", "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 "nvidia/Llama3-ChatQA-1.5-8B" \ --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": "nvidia/Llama3-ChatQA-1.5-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use nvidia/Llama3-ChatQA-1.5-8B with Docker Model Runner:
docker model run hf.co/nvidia/Llama3-ChatQA-1.5-8B
Update README.md
#33 opened 9 months ago
by
ReactionControl
add AIBOM
#32 opened over 1 year ago
by
sabato-nocera
Reproduction Fail on Llama 3 instruction
#31 opened over 1 year ago
by
chkwy
ChatQA 4_K_M on ollama
🤝 1
#30 opened about 2 years ago
by
AnirudhJM24
custom system prompt gets ignored
3
#28 opened about 2 years ago
by
parsapico
model returned the prompt template as the answer
1
#27 opened about 2 years ago
by
Jingni393
PrivateGPT Issues
#25 opened over 2 years ago
by
rohansri
OCR Text
#24 opened over 2 years ago
by
mahesh3717
can we use it using huggignfaceub api
#23 opened over 2 years ago
by
raza007
Error while using with Huggingfacehub api
#22 opened over 2 years ago
by
raza007
Suggestion on how to prompt the model for specific RAG use cases
#21 opened over 2 years ago
by
eloukas
Answer questions beyond the content provided
➕ 1
1
#20 opened over 2 years ago
by
longhtgg
megatron format to HF format
#19 opened over 2 years ago
by
jjw0126
[AUTOMATED] Model Memory Requirements
#18 opened over 2 years ago
by
model-sizer-bot
generation_config.json adds a mapping with the special token '<|im_end|>' to solve the problem of non-stop generation when <|im_end|> is encountered.
3
#17 opened over 2 years ago
by
zjyhf
The tokenizer adds a special token '<|im_end|>' to solve the problem of non-stop generation when encountering <|im_end|>.
1
#16 opened over 2 years ago
by
zjyhf
How to use in llama.cpp server
2
#15 opened over 2 years ago
by
subbur
how to set context in multi-turn QA?
6
#14 opened over 2 years ago
by
J22
Update README.md
#13 opened over 2 years ago
by
freyacoltman
Try to run with dedicated endpoint 4x A100 320GB still get not enough hardware capacity
5
#11 opened over 2 years ago
by
trungnx26
Colab Notebook
1
#10 opened over 2 years ago
by
ChristophSchuhmann
Megatron LM training (fine-tuning) code ?
3
#9 opened over 2 years ago
by
StephennFernandes
If i make context empty, it will output chinese.
6
#8 opened over 2 years ago
by
Cometyang
Adding `safetensors` variant of this model
#7 opened over 2 years ago
by
SFconvertbot
Adding `safetensors` variant of this model
#6 opened over 2 years ago
by
SFconvertbot
Chat template
❤️ 4
15
#5 opened over 2 years ago
by
bartowski
Adding `safetensors` variant of this model
#4 opened over 2 years ago
by
SFconvertbot
I got answer with the token "ologne" at the end
1
#3 opened over 2 years ago
by
Stilgar