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")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mxz/llama3-8b-sft") model = AutoModelForCausalLM.from_pretrained("mxz/llama3-8b-sft") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- 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
Upload folder using huggingface_hub
#1
by mxz - opened
Upload folder using huggingface_hub
Multi commit ID: 921471018d88dd486b128042e5338fbf58646db2ce0a3d2498cc3dde4b6ea382
Scheduled commits:
- Upload 1 file(s) totalling 5.0G (a62392f7faac0cfb742b82c8ce5abfe3e8a710a61ab867aa2cc7861f1fb884d3)
- Upload 1 file(s) totalling 4.9G (afce5a873f3796b8d9d0b34369f18aaa98ffb255fae1373e396e8b6a4467cba8)
- Upload 1 file(s) totalling 4.9G (3bbde38e6f0b91f9c82070c70ba4ae49eaa38687f0903276d1f5e9510d65c267)
- Upload 1 file(s) totalling 2.6G (6a2442c44d9770dd035a9c6ed32ca5d6ace9f4de699653d551a556a67e540f1a)
- Upload 7 file(s) totalling 9.2M (b78137c296ec70bd141a7402ab351392a8c211099545d3c5691e7a8cd3779856)
This is a PR opened using the huggingface_hub library in the context of a multi-commit. PR can be commented as a usual PR. However, please be aware that manually updating the PR description, changing the PR status, or pushing new commits, is not recommended as it might corrupt the commit process. Learn more about multi-commits in this guide.
mxz changed pull request status to open
mxz changed pull request title from [WIP] Upload folder using huggingface_hub (multi-commit 921471018d88dd486b128042e5338fbf58646db2ce0a3d2498cc3dde4b6ea382) to Upload folder using huggingface_hub
mxz changed pull request status to merged