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
Update README.md
Browse files
README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
# Doc / guide: https://huggingface.co/docs/hub/model-cards
|
| 4 |
{}
|
| 5 |
---
|
| 6 |
-
|
| 7 |
---
|
| 8 |
**datasets:** \
|
| 9 |
- mxz/alpaca_en_zh_ruozhiba_gpt4data \
|
|
@@ -13,19 +13,20 @@
|
|
| 13 |
- zh \
|
| 14 |
- en \
|
| 15 |
**metrics:** \
|
| 16 |
-
- perplexity \
|
| 17 |
-
**pipeline_tag:
|
|
|
|
| 18 |
**tags:** \
|
| 19 |
-
- SFT \
|
| 20 |
-
- fintune \
|
| 21 |
-
- alignment \
|
| 22 |
- LoRA \
|
| 23 |
-
- Llama-3
|
| 24 |
---
|
| 25 |
|
| 26 |
# About mxz-llama-3-8B-sft
|
| 27 |
|
| 28 |
-
This model trained by SFT
|
| 29 |
|
| 30 |
It's have coding, reasoing, chinese QA .
|
| 31 |
|
|
|
|
| 3 |
# Doc / guide: https://huggingface.co/docs/hub/model-cards
|
| 4 |
{}
|
| 5 |
---
|
| 6 |
+
# dataset Intruction
|
| 7 |
---
|
| 8 |
**datasets:** \
|
| 9 |
- mxz/alpaca_en_zh_ruozhiba_gpt4data \
|
|
|
|
| 13 |
- zh \
|
| 14 |
- en \
|
| 15 |
**metrics:** \
|
| 16 |
+
- perplexity \
|
| 17 |
+
**pipeline_tag:** \
|
| 18 |
+
- text-generation \
|
| 19 |
**tags:** \
|
| 20 |
+
- SFT \
|
| 21 |
+
- fintune \
|
| 22 |
+
- alignment \
|
| 23 |
- LoRA \
|
| 24 |
+
- Llama-3
|
| 25 |
---
|
| 26 |
|
| 27 |
# About mxz-llama-3-8B-sft
|
| 28 |
|
| 29 |
+
This model trained by SFT.
|
| 30 |
|
| 31 |
It's have coding, reasoing, chinese QA .
|
| 32 |
|