Text Generation
Transformers
Safetensors
mistral
trl
dpo
Generated from Trainer
conversational
text-generation-inference
Instructions to use tsavage68/Mistral2_500_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_500_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_500_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_500_STEPS_03beta_1e6_CDPOSFT") model = AutoModelForCausalLM.from_pretrained("tsavage68/Mistral2_500_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_500_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_500_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_500_STEPS_03beta_1e6_CDPOSFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tsavage68/Mistral2_500_STEPS_03beta_1e6_CDPOSFT
- SGLang
How to use tsavage68/Mistral2_500_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_500_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_500_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_500_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_500_STEPS_03beta_1e6_CDPOSFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tsavage68/Mistral2_500_STEPS_03beta_1e6_CDPOSFT with Docker Model Runner:
docker model run hf.co/tsavage68/Mistral2_500_STEPS_03beta_1e6_CDPOSFT
Mistral2_500_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.9078
- Rewards/chosen: 0.9010
- Rewards/rejected: 0.9103
- Rewards/accuracies: 0.4264
- Rewards/margins: -0.0093
- Logps/rejected: -74.4872
- Logps/chosen: -72.4988
- Logits/rejected: -2.2208
- Logits/chosen: -2.2208
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: 500
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 |
| 0.9659 | 0.2930 | 150 | 1.0129 | -0.1807 | -0.0985 | 0.4066 | -0.0822 | -77.8497 | -76.1043 | -2.2549 | -2.2547 |
| 1.0344 | 0.3906 | 200 | 0.9907 | 0.7434 | 0.7229 | 0.4154 | 0.0205 | -75.1118 | -73.0240 | -1.8653 | -1.8653 |
| 1.0288 | 0.4883 | 250 | 1.0213 | 0.0313 | -0.0408 | 0.3956 | 0.0722 | -77.6576 | -75.3976 | -2.9696 | -2.9697 |
| 0.9039 | 0.5859 | 300 | 1.0169 | 0.1606 | 0.1630 | 0.4176 | -0.0024 | -76.9781 | -74.9667 | -2.5569 | -2.5569 |
| 0.7829 | 0.6836 | 350 | 0.9615 | 0.7982 | 0.8506 | 0.4022 | -0.0524 | -74.6861 | -72.8413 | -2.0384 | -2.0382 |
| 0.8517 | 0.7812 | 400 | 0.9323 | 0.9042 | 0.9403 | 0.4264 | -0.0361 | -74.3873 | -72.4880 | -2.2049 | -2.2048 |
| 0.9601 | 0.8789 | 450 | 0.9082 | 0.9006 | 0.9106 | 0.4286 | -0.0100 | -74.4862 | -72.5 | -2.2210 | -2.2210 |
| 0.7935 | 0.9766 | 500 | 0.9078 | 0.9010 | 0.9103 | 0.4264 | -0.0093 | -74.4872 | -72.4988 | -2.2208 | -2.2208 |
Framework versions
- Transformers 4.40.1
- Pytorch 2.0.0+cu117
- Datasets 2.19.0
- Tokenizers 0.19.1
- Downloads last month
- 7
Model tree for tsavage68/Mistral2_500_STEPS_03beta_1e6_CDPOSFT
Base model
mistralai/Mistral-7B-Instruct-v0.2 Finetuned
tsavage68/mistralit2_1000_STEPS_5e7_SFT