Text Generation
Transformers
Safetensors
llama
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use FuseAI/FuseChat-Llama-3.1-8B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FuseAI/FuseChat-Llama-3.1-8B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FuseAI/FuseChat-Llama-3.1-8B-Instruct") 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("FuseAI/FuseChat-Llama-3.1-8B-Instruct") model = AutoModelForCausalLM.from_pretrained("FuseAI/FuseChat-Llama-3.1-8B-Instruct", 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 FuseAI/FuseChat-Llama-3.1-8B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FuseAI/FuseChat-Llama-3.1-8B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FuseAI/FuseChat-Llama-3.1-8B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/FuseAI/FuseChat-Llama-3.1-8B-Instruct
- SGLang
How to use FuseAI/FuseChat-Llama-3.1-8B-Instruct 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 "FuseAI/FuseChat-Llama-3.1-8B-Instruct" \ --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": "FuseAI/FuseChat-Llama-3.1-8B-Instruct", "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 "FuseAI/FuseChat-Llama-3.1-8B-Instruct" \ --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": "FuseAI/FuseChat-Llama-3.1-8B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use FuseAI/FuseChat-Llama-3.1-8B-Instruct with Docker Model Runner:
docker model run hf.co/FuseAI/FuseChat-Llama-3.1-8B-Instruct
Commit History
-
Add missing metadata: library_name, pipeline_tag, license (#2)
Verified signature- Add missing metadata: library_name, pipeline_tag, license (8d89c032ecd5caa5141291dfc36851c38287ad93) Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>e154183
-
Update README.md
Verified signature74e0080 -
Update README.md
Verified signature44f37ab
-
Update README.md
Verified signature007f2da -
Update README.md
Verified signature2cc7f69
-
Adding Evaluation Results (#1)
Verified signature- Adding Evaluation Results (327e2d9f345f763b2b3202e404fba102db1a3730) Co-authored-by: Some Body <T145@users.noreply.huggingface.co>65bddb1
-
Update README.md
Verified signaturecbb3acc -
Update README.md
Verified signature6d890a6 -
Upload 2 files
Verified signature33c7aa8
-
Update README.md
Verified signature943b2c3 -
Update README.md
Verified signature11c28ac -
Update README.md
Verified signature129cc75 -
Update README.md
Verified signatured6b0951 -
Update README.md
Verified signaturef7f7602
-
Update README.md
Verified signaturef740497 -
Update README.md
Verified signature839febb -
Create README.md
Verified signaturef736bea -
Delete trainer_state.json
Verified signature8ad5dcf -
Upload folder using huggingface_hub
Verified signature145ea88 -
initial commit
Verified signature61abcd6