Text Generation
Transformers
Safetensors
mistral
trl
dpo
Generated from Trainer
conversational
text-generation-inference
Instructions to use wxzhang/dpo-selective-buffer-spo-shift with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wxzhang/dpo-selective-buffer-spo-shift with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wxzhang/dpo-selective-buffer-spo-shift") 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-spo-shift") model = AutoModelForCausalLM.from_pretrained("wxzhang/dpo-selective-buffer-spo-shift", 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use wxzhang/dpo-selective-buffer-spo-shift 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-spo-shift" # 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-spo-shift", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/wxzhang/dpo-selective-buffer-spo-shift
- SGLang
How to use wxzhang/dpo-selective-buffer-spo-shift 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-spo-shift" \ --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-spo-shift", "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-spo-shift" \ --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-spo-shift", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use wxzhang/dpo-selective-buffer-spo-shift with Docker Model Runner:
docker model run hf.co/wxzhang/dpo-selective-buffer-spo-shift
Commit History
-
Model save
Verified signature5d84c8e -
Model save
Verified signaturec6b731c -
Model save
Verified signature82f7292 -
Model save
Verified signature45a0142 -
Training in progress, step 1500
Verified signaturebc9bace -
Training in progress, step 1500
Verified signature23cbe26 -
Training in progress, step 1500
Verified signature8f23e16 -
Training in progress, step 1500
Verified signature6000052 -
Training in progress, step 1000
Verified signature257a7ce -
Training in progress, step 1000
Verified signature1072180 -
Training in progress, step 1000
Verified signature5c0a3d4 -
Training in progress, step 1000
Verified signature43fbf85 -
Training in progress, step 500
Verified signaturea5656bc -
Training in progress, step 500
Verified signature4f58f32 -
Training in progress, step 500
Verified signatureec04f83 -
Training in progress, step 500
Verified signature5de0e46 -
Training in progress, step 500
Verified signature63e07f4
-
Model save
Verified signature7abe765 -
Model save
Verified signature4960e58 -
Training in progress, step 1500
Verified signature2dff64a -
Training in progress, step 1500
Verified signaturec7e5794 -
Training in progress, step 1000
Verified signaturec635698 -
Training in progress, step 1000
Verified signaturebdc8bd2 -
Training in progress, step 500
Verified signaturea8b5f4b -
Training in progress, step 500
Verified signature2d2c151
-
Training in progress, step 500
Verified signatured110d0d -
Training in progress, step 500
Verified signaturee9ed62f -
Training in progress, step 500
Verified signaturedcd2cb6 -
Training in progress, step 500
Verified signaturef6ce4b0 -
Training in progress, step 500
Verified signature8a09f9d
-
Model save
Verified signature7857fdf -
Training in progress, step 1500
Verified signaturee3eab43 -
Training in progress, step 1000
Verified signature38e9735 -
Training in progress, step 500
Verified signatured4f5aa4
-
Training in progress, step 1000
Verified signatured4b67b9 -
Training in progress, step 500
Verified signature6199841
-
Model save
Verified signatureec189c5 -
Training in progress, step 1500
Verified signature7f6a6b4 -
Training in progress, step 1000
Verified signature3530f90 -
Training in progress, step 500
Verified signatureba3932d -
initial commit
Verified signaturec19756e