Instructions to use mxz/llama3-8b-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mxz/llama3-8b-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mxz/llama3-8b-sft")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mxz/llama3-8b-sft") model = AutoModelForCausalLM.from_pretrained("mxz/llama3-8b-sft", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mxz/llama3-8b-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mxz/llama3-8b-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mxz/llama3-8b-sft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mxz/llama3-8b-sft
- SGLang
How to use mxz/llama3-8b-sft 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 "mxz/llama3-8b-sft" \ --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": "mxz/llama3-8b-sft", "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 "mxz/llama3-8b-sft" \ --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": "mxz/llama3-8b-sft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mxz/llama3-8b-sft with Docker Model Runner:
docker model run hf.co/mxz/llama3-8b-sft
Commit History
-
Update README.md
Verified signaturef891353
-
Update README.md
Verified signaturec1e058e -
Upload folder using huggingface_hub (#1)
Verified signature- a62392f7faac0cfb742b82c8ce5abfe3e8a710a61ab867aa2cc7861f1fb884d3 (d3562450b79526ef6d3095a64d7501f991ffc7d6) - afce5a873f3796b8d9d0b34369f18aaa98ffb255fae1373e396e8b6a4467cba8 (26139bdac0428ab470954f63a6588676c5130677) - 3bbde38e6f0b91f9c82070c70ba4ae49eaa38687f0903276d1f5e9510d65c267 (51bca66afa9ba35835d557b6a5f2c44c1a2a6268) - 6a2442c44d9770dd035a9c6ed32ca5d6ace9f4de699653d551a556a67e540f1a (beff86fb6e704e5c29a8777602923d9e0c5de7cd) - b78137c296ec70bd141a7402ab351392a8c211099545d3c5691e7a8cd3779856 (2a513c6b972a535dee4ede9fa7c8ab0bbadda564)81ea9da -
Update README.md
Verified signature05e954e -
Upload folder using huggingface_hub
Verified signature2990d67 -
Update README.md
Verified signature8fba05f -
Update README.md
Verified signatured5461e4 -
Update README.md
Verified signature5e6218c -
Create README.md
Verified signaturea4d87e9
-
initial commit
Verified signature20cfb5f