Text Generation
Transformers
TensorBoard
Safetensors
llama
trl
dpo
Generated from Trainer
text-generation-inference
Instructions to use sarthakrw/dpo_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sarthakrw/dpo_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sarthakrw/dpo_model")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sarthakrw/dpo_model") model = AutoModelForCausalLM.from_pretrained("sarthakrw/dpo_model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sarthakrw/dpo_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sarthakrw/dpo_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sarthakrw/dpo_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sarthakrw/dpo_model
- SGLang
How to use sarthakrw/dpo_model 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 "sarthakrw/dpo_model" \ --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": "sarthakrw/dpo_model", "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 "sarthakrw/dpo_model" \ --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": "sarthakrw/dpo_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use sarthakrw/dpo_model with Docker Model Runner:
docker model run hf.co/sarthakrw/dpo_model
sarthakrw/DPO-model-formatted
Browse files
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 538092712
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b7cf1031fcaf4fc37393bc19f256819d6d7240611cfedb339524b0d9dd52e55e
|
| 3 |
size 538092712
|
runs/Sep15_19-30-31_e854702238d4/events.out.tfevents.1726428656.e854702238d4.262.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cb8c881208b18da68c952c09ccb6dc5d8949032873330547e7e5f3edeef76ee3
|
| 3 |
+
size 8389
|
runs/Sep15_19-35-45_e854702238d4/events.out.tfevents.1726428973.e854702238d4.262.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a531dfbdd28de285d29eed32bac2926f4a903b863190de7ecf16ded44fab3368
|
| 3 |
+
size 27223
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5944
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5ec5bd4fd3e0cb65416f82e8388fb333e9cea09873e0985c70fa2b0b14c3a116
|
| 3 |
size 5944
|