Instructions to use PHIMemo/llama31-8b-instruct-sft-balanced-3k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PHIMemo/llama31-8b-instruct-sft-balanced-3k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="PHIMemo/llama31-8b-instruct-sft-balanced-3k")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("PHIMemo/llama31-8b-instruct-sft-balanced-3k", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use PHIMemo/llama31-8b-instruct-sft-balanced-3k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PHIMemo/llama31-8b-instruct-sft-balanced-3k" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PHIMemo/llama31-8b-instruct-sft-balanced-3k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/PHIMemo/llama31-8b-instruct-sft-balanced-3k
- SGLang
How to use PHIMemo/llama31-8b-instruct-sft-balanced-3k 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 "PHIMemo/llama31-8b-instruct-sft-balanced-3k" \ --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": "PHIMemo/llama31-8b-instruct-sft-balanced-3k", "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 "PHIMemo/llama31-8b-instruct-sft-balanced-3k" \ --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": "PHIMemo/llama31-8b-instruct-sft-balanced-3k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use PHIMemo/llama31-8b-instruct-sft-balanced-3k with Docker Model Runner:
docker model run hf.co/PHIMemo/llama31-8b-instruct-sft-balanced-3k
Update model card with all SFT checkpoint revisions
Browse files
README.md
CHANGED
|
@@ -11,23 +11,33 @@ library_name: transformers
|
|
| 11 |
|
| 12 |
# Llama 3.1 8B Instruct — balanced 3k SFT (synthetic canaries)
|
| 13 |
|
| 14 |
-
Fine-tuned
|
| 15 |
|
| 16 |
## Revisions
|
| 17 |
-
| Revision | Training step |
|
| 18 |
|---|---|---|
|
| 19 |
-
| `step-
|
| 20 |
-
| `step-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
## Load
|
| 23 |
```python
|
| 24 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 25 |
repo = "PHIMemo/llama31-8b-instruct-sft-balanced-3k"
|
| 26 |
-
|
| 27 |
-
|
|
|
|
| 28 |
```
|
| 29 |
|
| 30 |
## Notes
|
| 31 |
- Synthetic dossiers only (not real PHI).
|
| 32 |
-
- Weights only (`model.safetensors`); optimizer / trainer state not uploaded.
|
| 33 |
- Gated base model terms still apply for Llama 3.1.
|
|
|
|
| 11 |
|
| 12 |
# Llama 3.1 8B Instruct — balanced 3k SFT (synthetic canaries)
|
| 13 |
|
| 14 |
+
Fine-tuned checkpoints from the **model-memo-diff** / PHIMemo project (PHI / benign / public seeded documents).
|
| 15 |
|
| 16 |
## Revisions
|
| 17 |
+
| Revision | Training step | Notes |
|
| 18 |
|---|---|---|
|
| 19 |
+
| `step-000040` | 40 | SFT checkpoint |
|
| 20 |
+
| `step-000080` | 80 | SFT checkpoint |
|
| 21 |
+
| `step-000160` | 160 | early / donor |
|
| 22 |
+
| `step-000240` | 240 | SFT checkpoint |
|
| 23 |
+
| `step-000320` | 320 | SFT checkpoint |
|
| 24 |
+
| `step-000400` | 400 | SFT checkpoint |
|
| 25 |
+
| `step-000480` | 480 | SFT checkpoint |
|
| 26 |
+
| `step-000640` | 640 | SFT checkpoint |
|
| 27 |
+
| `step-000720` | 720 | SFT checkpoint |
|
| 28 |
+
| `step-000760` | 760 | near-peak |
|
| 29 |
+
| `step-000800` | 800 | near-peak |
|
| 30 |
|
| 31 |
## Load
|
| 32 |
```python
|
| 33 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 34 |
repo = "PHIMemo/llama31-8b-instruct-sft-balanced-3k"
|
| 35 |
+
rev = "step-000800" # or any revision above
|
| 36 |
+
tok = AutoTokenizer.from_pretrained(repo, revision=rev)
|
| 37 |
+
model = AutoModelForCausalLM.from_pretrained(repo, revision=rev, torch_dtype="auto", device_map="auto")
|
| 38 |
```
|
| 39 |
|
| 40 |
## Notes
|
| 41 |
- Synthetic dossiers only (not real PHI).
|
| 42 |
+
- Weights only (`model.safetensors` + configs); optimizer / trainer state not uploaded.
|
| 43 |
- Gated base model terms still apply for Llama 3.1.
|