Text Generation
Transformers
Safetensors
mistral
alignment-handbook
Generated from Trainer
trl
dpo
conversational
text-generation-inference
Instructions to use wxzhang/selective-pairrm-33045197-mt0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wxzhang/selective-pairrm-33045197-mt0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wxzhang/selective-pairrm-33045197-mt0") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("wxzhang/selective-pairrm-33045197-mt0") model = AutoModelForCausalLM.from_pretrained("wxzhang/selective-pairrm-33045197-mt0", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use wxzhang/selective-pairrm-33045197-mt0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wxzhang/selective-pairrm-33045197-mt0" # 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/selective-pairrm-33045197-mt0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/wxzhang/selective-pairrm-33045197-mt0
- SGLang
How to use wxzhang/selective-pairrm-33045197-mt0 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/selective-pairrm-33045197-mt0" \ --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/selective-pairrm-33045197-mt0", "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/selective-pairrm-33045197-mt0" \ --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/selective-pairrm-33045197-mt0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use wxzhang/selective-pairrm-33045197-mt0 with Docker Model Runner:
docker model run hf.co/wxzhang/selective-pairrm-33045197-mt0
End of training
Browse files- README.md +5 -1
- config.json +1 -1
README.md
CHANGED
|
@@ -2,9 +2,13 @@
|
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: mistralai/Mistral-7B-Instruct-v0.2
|
| 4 |
tags:
|
|
|
|
|
|
|
| 5 |
- trl
|
| 6 |
- dpo
|
| 7 |
- generated_from_trainer
|
|
|
|
|
|
|
| 8 |
model-index:
|
| 9 |
- name: selective-pairrm-33045197-mt0
|
| 10 |
results: []
|
|
@@ -15,7 +19,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 15 |
|
| 16 |
# selective-pairrm-33045197-mt0
|
| 17 |
|
| 18 |
-
This model is a fine-tuned version of [mistralai/Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) on the
|
| 19 |
It achieves the following results on the evaluation set:
|
| 20 |
- Loss: 0.6825
|
| 21 |
- Rewards/chosen: -0.2329
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: mistralai/Mistral-7B-Instruct-v0.2
|
| 4 |
tags:
|
| 5 |
+
- alignment-handbook
|
| 6 |
+
- generated_from_trainer
|
| 7 |
- trl
|
| 8 |
- dpo
|
| 9 |
- generated_from_trainer
|
| 10 |
+
datasets:
|
| 11 |
+
- snorkelai/Snorkel-Mistral-PairRM-DPO-Dataset
|
| 12 |
model-index:
|
| 13 |
- name: selective-pairrm-33045197-mt0
|
| 14 |
results: []
|
|
|
|
| 19 |
|
| 20 |
# selective-pairrm-33045197-mt0
|
| 21 |
|
| 22 |
+
This model is a fine-tuned version of [mistralai/Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) on the snorkelai/Snorkel-Mistral-PairRM-DPO-Dataset dataset.
|
| 23 |
It achieves the following results on the evaluation set:
|
| 24 |
- Loss: 0.6825
|
| 25 |
- Rewards/chosen: -0.2329
|
config.json
CHANGED
|
@@ -21,6 +21,6 @@
|
|
| 21 |
"tie_word_embeddings": false,
|
| 22 |
"torch_dtype": "bfloat16",
|
| 23 |
"transformers_version": "4.36.2",
|
| 24 |
-
"use_cache":
|
| 25 |
"vocab_size": 32000
|
| 26 |
}
|
|
|
|
| 21 |
"tie_word_embeddings": false,
|
| 22 |
"torch_dtype": "bfloat16",
|
| 23 |
"transformers_version": "4.36.2",
|
| 24 |
+
"use_cache": true,
|
| 25 |
"vocab_size": 32000
|
| 26 |
}
|