Instructions to use sweetpablo/llama_ft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sweetpablo/llama_ft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sweetpablo/llama_ft")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sweetpablo/llama_ft") model = AutoModelForCausalLM.from_pretrained("sweetpablo/llama_ft") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sweetpablo/llama_ft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sweetpablo/llama_ft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sweetpablo/llama_ft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sweetpablo/llama_ft
- SGLang
How to use sweetpablo/llama_ft 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 "sweetpablo/llama_ft" \ --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": "sweetpablo/llama_ft", "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 "sweetpablo/llama_ft" \ --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": "sweetpablo/llama_ft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use sweetpablo/llama_ft with Docker Model Runner:
docker model run hf.co/sweetpablo/llama_ft
Commit ·
8609b38
1
Parent(s): b5df2ae
Upload 4 files
Browse files- departments.csv +22 -0
- gradio_app_llama_ft.ipynb +0 -0
- llama2-ft-qna.ipynb +0 -0
- products.csv +0 -0
departments.csv
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
department_id,department
|
| 2 |
+
1,frozen
|
| 3 |
+
2,other
|
| 4 |
+
3,bakery
|
| 5 |
+
4,produce
|
| 6 |
+
5,alcohol
|
| 7 |
+
6,international
|
| 8 |
+
7,beverages
|
| 9 |
+
8,pets
|
| 10 |
+
9,dry goods pasta
|
| 11 |
+
10,bulk
|
| 12 |
+
11,personal care
|
| 13 |
+
12,meat seafood
|
| 14 |
+
13,pantry
|
| 15 |
+
14,breakfast
|
| 16 |
+
15,canned goods
|
| 17 |
+
16,dairy eggs
|
| 18 |
+
17,household
|
| 19 |
+
18,babies
|
| 20 |
+
19,snacks
|
| 21 |
+
20,deli
|
| 22 |
+
21,missing
|
gradio_app_llama_ft.ipynb
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
llama2-ft-qna.ipynb
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
products.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|