Text Generation
Transformers
Safetensors
mistral
trl
dpo
Generated from Trainer
conversational
text-generation-inference
Instructions to use wxzhang/dpo-selective-buffer-safeipo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wxzhang/dpo-selective-buffer-safeipo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wxzhang/dpo-selective-buffer-safeipo") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("wxzhang/dpo-selective-buffer-safeipo") model = AutoModelForCausalLM.from_pretrained("wxzhang/dpo-selective-buffer-safeipo", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use wxzhang/dpo-selective-buffer-safeipo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wxzhang/dpo-selective-buffer-safeipo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wxzhang/dpo-selective-buffer-safeipo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/wxzhang/dpo-selective-buffer-safeipo
- SGLang
How to use wxzhang/dpo-selective-buffer-safeipo 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 "wxzhang/dpo-selective-buffer-safeipo" \ --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": "wxzhang/dpo-selective-buffer-safeipo", "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 "wxzhang/dpo-selective-buffer-safeipo" \ --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": "wxzhang/dpo-selective-buffer-safeipo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use wxzhang/dpo-selective-buffer-safeipo with Docker Model Runner:
docker model run hf.co/wxzhang/dpo-selective-buffer-safeipo
Commit History
-
Training in progress, step 500
Verified signatureba29dcf
-
Training in progress, step 500
Verified signature0c19240
-
Training in progress, step 300
Verified signaturefd966c3
-
Training in progress, step 300
Verified signature728aeb4
-
Training in progress, step 1500
Verified signature3eb9a60 -
Model save
Verified signatured3227fa -
Training in progress, step 1000
Verified signature7806698 -
Training in progress, step 500
Verified signature0a7cbaa
-
Training in progress, step 500
Verified signature9606c7d
-
Training in progress, step 500
Verified signaturec665e8f
-
Training in progress, step 500
Verified signaturebeb1f0d -
Training in progress, step 500
Verified signaturea18c6cc
-
Model save
Verified signatureb8aa131 -
Model save
Verified signature7b42cac -
Training in progress, step 500
Verified signatureb5d04b1 -
Training in progress, step 500
Verified signature7b47be6
-
Model save
Verified signature3c66b7e -
Model save
Verified signature8ffa4d8 -
Training in progress, step 1500
Verified signature9984ea8 -
Training in progress, step 1500
Verified signature84b3b06 -
Training in progress, step 1000
Verified signaturecf59b1e -
Training in progress, step 1000
Verified signaturebdcab0c -
Training in progress, step 500
Verified signature86a6c2e -
Training in progress, step 500
Verified signature80a3156
-
Training in progress, step 500
Verified signatureec1449c