Text Generation
Transformers
Safetensors
mistral
trl
dpo
Generated from Trainer
conversational
text-generation-inference
Instructions to use tsavage68/Mistral2_1000_STEPS_03beta_1e6_CDPOSFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tsavage68/Mistral2_1000_STEPS_03beta_1e6_CDPOSFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tsavage68/Mistral2_1000_STEPS_03beta_1e6_CDPOSFT") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tsavage68/Mistral2_1000_STEPS_03beta_1e6_CDPOSFT") model = AutoModelForCausalLM.from_pretrained("tsavage68/Mistral2_1000_STEPS_03beta_1e6_CDPOSFT", 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 tsavage68/Mistral2_1000_STEPS_03beta_1e6_CDPOSFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tsavage68/Mistral2_1000_STEPS_03beta_1e6_CDPOSFT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tsavage68/Mistral2_1000_STEPS_03beta_1e6_CDPOSFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tsavage68/Mistral2_1000_STEPS_03beta_1e6_CDPOSFT
- SGLang
How to use tsavage68/Mistral2_1000_STEPS_03beta_1e6_CDPOSFT 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 "tsavage68/Mistral2_1000_STEPS_03beta_1e6_CDPOSFT" \ --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": "tsavage68/Mistral2_1000_STEPS_03beta_1e6_CDPOSFT", "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 "tsavage68/Mistral2_1000_STEPS_03beta_1e6_CDPOSFT" \ --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": "tsavage68/Mistral2_1000_STEPS_03beta_1e6_CDPOSFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tsavage68/Mistral2_1000_STEPS_03beta_1e6_CDPOSFT with Docker Model Runner:
docker model run hf.co/tsavage68/Mistral2_1000_STEPS_03beta_1e6_CDPOSFT
Mistral2_1000_STEPS_03beta_1e6_CDPOSFT
This model is a fine-tuned version of tsavage68/mistralit2_1000_STEPS_5e7_SFT on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 0.9147
- Rewards/chosen: 0.2853
- Rewards/rejected: 0.2117
- Rewards/accuracies: 0.4637
- Rewards/margins: 0.0736
- Logps/rejected: -76.8158
- Logps/chosen: -74.5509
- Logits/rejected: -1.8957
- Logits/chosen: -1.8954
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 1e-06
- train_batch_size: 4
- eval_batch_size: 1
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 8
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 100
- training_steps: 1000
Training results
| Training Loss | Epoch | Step | Validation Loss | Rewards/chosen | Rewards/rejected | Rewards/accuracies | Rewards/margins | Logps/rejected | Logps/chosen | Logits/rejected | Logits/chosen |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0.831 | 0.0977 | 50 | 0.8025 | 0.6608 | 0.6344 | 0.4132 | 0.0264 | -75.4068 | -73.2992 | -2.0277 | -2.0274 |
| 0.6868 | 0.1953 | 100 | 0.9417 | 0.1823 | 0.1932 | 0.4198 | -0.0109 | -76.8774 | -74.8943 | -2.0626 | -2.0624 |
| 1.1447 | 0.2930 | 150 | 1.0449 | 0.0804 | 0.1916 | 0.4000 | -0.1112 | -76.8828 | -75.2339 | -2.0660 | -2.0660 |
| 1.0588 | 0.3906 | 200 | 1.0433 | 0.5444 | 0.5437 | 0.4176 | 0.0007 | -75.7091 | -73.6874 | -1.8690 | -1.8690 |
| 1.1749 | 0.4883 | 250 | 1.0509 | 0.0937 | 0.0800 | 0.3780 | 0.0138 | -77.2550 | -75.1895 | -2.7221 | -2.7221 |
| 0.9602 | 0.5859 | 300 | 1.0556 | 0.6428 | 0.6497 | 0.3978 | -0.0069 | -75.3558 | -73.3592 | -2.1885 | -2.1884 |
| 0.8567 | 0.6836 | 350 | 1.0032 | 0.8514 | 0.9163 | 0.4022 | -0.0649 | -74.4671 | -72.6639 | -1.9197 | -1.9197 |
| 0.8145 | 0.7812 | 400 | 0.9071 | 0.7911 | 0.7180 | 0.4549 | 0.0730 | -75.1281 | -72.8651 | -2.1063 | -2.1063 |
| 0.9805 | 0.8789 | 450 | 0.9092 | 1.0927 | 0.9910 | 0.4549 | 0.1017 | -74.2182 | -71.8597 | -2.3062 | -2.3062 |
| 0.8022 | 0.9766 | 500 | 0.8968 | 1.2157 | 1.1916 | 0.4396 | 0.0241 | -73.5496 | -71.4498 | -1.9867 | -1.9865 |
| 0.4835 | 1.0742 | 550 | 0.9087 | 0.3603 | 0.2979 | 0.4396 | 0.0624 | -76.5285 | -74.3010 | -2.4092 | -2.4089 |
| 0.7127 | 1.1719 | 600 | 0.9140 | 0.2002 | 0.1567 | 0.4374 | 0.0435 | -76.9992 | -74.8348 | -2.1858 | -2.1855 |
| 0.4928 | 1.2695 | 650 | 0.9377 | 0.3603 | 0.3349 | 0.4396 | 0.0253 | -76.4051 | -74.3011 | -2.0564 | -2.0560 |
| 0.5228 | 1.3672 | 700 | 0.9233 | 0.3468 | 0.2928 | 0.4462 | 0.0541 | -76.5456 | -74.3459 | -1.8095 | -1.8091 |
| 0.4985 | 1.4648 | 750 | 0.9155 | 0.3134 | 0.2441 | 0.4484 | 0.0693 | -76.7079 | -74.4573 | -1.9045 | -1.9041 |
| 0.5495 | 1.5625 | 800 | 0.9141 | 0.2956 | 0.2238 | 0.4593 | 0.0717 | -76.7754 | -74.5168 | -1.8841 | -1.8837 |
| 0.518 | 1.6602 | 850 | 0.9136 | 0.2853 | 0.2115 | 0.4637 | 0.0737 | -76.8164 | -74.5511 | -1.8972 | -1.8968 |
| 0.5009 | 1.7578 | 900 | 0.9149 | 0.2859 | 0.2124 | 0.4637 | 0.0735 | -76.8134 | -74.5489 | -1.8954 | -1.8950 |
| 0.4334 | 1.8555 | 950 | 0.9148 | 0.2846 | 0.2116 | 0.4659 | 0.0730 | -76.8163 | -74.5534 | -1.8957 | -1.8953 |
| 0.3651 | 1.9531 | 1000 | 0.9147 | 0.2853 | 0.2117 | 0.4637 | 0.0736 | -76.8158 | -74.5509 | -1.8957 | -1.8954 |
Framework versions
- Transformers 4.40.1
- Pytorch 2.0.0+cu117
- Datasets 2.19.0
- Tokenizers 0.19.1
- Downloads last month
- 6
Model tree for tsavage68/Mistral2_1000_STEPS_03beta_1e6_CDPOSFT
Base model
mistralai/Mistral-7B-Instruct-v0.2 Finetuned
tsavage68/mistralit2_1000_STEPS_5e7_SFT