Instructions to use Tandogan/MNLP_M3_dpo_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tandogan/MNLP_M3_dpo_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Tandogan/MNLP_M3_dpo_model")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Tandogan/MNLP_M3_dpo_model") model = AutoModelForCausalLM.from_pretrained("Tandogan/MNLP_M3_dpo_model") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Tandogan/MNLP_M3_dpo_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Tandogan/MNLP_M3_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": "Tandogan/MNLP_M3_dpo_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Tandogan/MNLP_M3_dpo_model
- SGLang
How to use Tandogan/MNLP_M3_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 "Tandogan/MNLP_M3_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": "Tandogan/MNLP_M3_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 "Tandogan/MNLP_M3_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": "Tandogan/MNLP_M3_dpo_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Tandogan/MNLP_M3_dpo_model with Docker Model Runner:
docker model run hf.co/Tandogan/MNLP_M3_dpo_model
Update README.md
Browse files
README.md
CHANGED
|
@@ -28,7 +28,7 @@ DPO lets us directly train the model to score preferred responses higher than le
|
|
| 28 |
- **Optimizer**: AdamW (learning rate = `2e-6`, weight decay = `0`)
|
| 29 |
- **Precision**: bf16
|
| 30 |
- **Batch size**: 2 (gradient accumulation = 4)
|
| 31 |
-
- **Scheduler**:
|
| 32 |
- **DPO Beta**: 0.1
|
| 33 |
- **Eval & Checkpointing**: Every epoch
|
| 34 |
- **Monitoring**: Weights & Biases (WandB)
|
|
|
|
| 28 |
- **Optimizer**: AdamW (learning rate = `2e-6`, weight decay = `0`)
|
| 29 |
- **Precision**: bf16
|
| 30 |
- **Batch size**: 2 (gradient accumulation = 4)
|
| 31 |
+
- **Scheduler**: cosine with 1% warmup
|
| 32 |
- **DPO Beta**: 0.1
|
| 33 |
- **Eval & Checkpointing**: Every epoch
|
| 34 |
- **Monitoring**: Weights & Biases (WandB)
|