Text Generation
Transformers
Safetensors
English
llama
orpo
llama 3
rlhf
sft
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use dfurman/Llama-3-8B-Orpo-v0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dfurman/Llama-3-8B-Orpo-v0.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dfurman/Llama-3-8B-Orpo-v0.1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dfurman/Llama-3-8B-Orpo-v0.1") model = AutoModelForCausalLM.from_pretrained("dfurman/Llama-3-8B-Orpo-v0.1", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dfurman/Llama-3-8B-Orpo-v0.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dfurman/Llama-3-8B-Orpo-v0.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dfurman/Llama-3-8B-Orpo-v0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dfurman/Llama-3-8B-Orpo-v0.1
- SGLang
How to use dfurman/Llama-3-8B-Orpo-v0.1 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 "dfurman/Llama-3-8B-Orpo-v0.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dfurman/Llama-3-8B-Orpo-v0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "dfurman/Llama-3-8B-Orpo-v0.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dfurman/Llama-3-8B-Orpo-v0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dfurman/Llama-3-8B-Orpo-v0.1 with Docker Model Runner:
docker model run hf.co/dfurman/Llama-3-8B-Orpo-v0.1
Upload LlamaForCausalLM
Browse files
README.md
CHANGED
|
@@ -8,10 +8,10 @@ tags:
|
|
| 8 |
- llama 3
|
| 9 |
- rlhf
|
| 10 |
- sft
|
| 11 |
-
datasets:
|
| 12 |
-
- mlabonne/orpo-dpo-mix-40k
|
| 13 |
base_model:
|
| 14 |
- meta-llama/Meta-Llama-3-8B
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
|
| 17 |
# dfurman/Llama-3-8B-Orpo-v0.1
|
|
|
|
| 8 |
- llama 3
|
| 9 |
- rlhf
|
| 10 |
- sft
|
|
|
|
|
|
|
| 11 |
base_model:
|
| 12 |
- meta-llama/Meta-Llama-3-8B
|
| 13 |
+
datasets:
|
| 14 |
+
- mlabonne/orpo-dpo-mix-40k
|
| 15 |
---
|
| 16 |
|
| 17 |
# dfurman/Llama-3-8B-Orpo-v0.1
|
model-00001-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4976714976
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:907237ba31521dc9c2e754f65aae983e6d84a698d2f1c6318a74fd78fe856f73
|
| 3 |
size 4976714976
|
model-00002-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4999802616
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7d36c8d400a38c4a3c24cc6a19859354963685125bc5043ce67acdcd1a6fd838
|
| 3 |
size 4999802616
|
model-00003-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4915916080
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f34df12505f4997b4970360675452a72197ae0ad3ec223b5daed82cdaa110e25
|
| 3 |
size 4915916080
|
model-00004-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1168155192
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f34c205c15dcc9450bd8f1fac1c148d2ee8af017377676282b6991ae858035e2
|
| 3 |
size 1168155192
|