Instructions to use dvijay/mistral-alpaca-finetune with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dvijay/mistral-alpaca-finetune with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dvijay/mistral-alpaca-finetune")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dvijay/mistral-alpaca-finetune") model = AutoModelForCausalLM.from_pretrained("dvijay/mistral-alpaca-finetune") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use dvijay/mistral-alpaca-finetune with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dvijay/mistral-alpaca-finetune" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dvijay/mistral-alpaca-finetune", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/dvijay/mistral-alpaca-finetune
- SGLang
How to use dvijay/mistral-alpaca-finetune 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 "dvijay/mistral-alpaca-finetune" \ --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": "dvijay/mistral-alpaca-finetune", "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 "dvijay/mistral-alpaca-finetune" \ --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": "dvijay/mistral-alpaca-finetune", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use dvijay/mistral-alpaca-finetune with Docker Model Runner:
docker model run hf.co/dvijay/mistral-alpaca-finetune
mistral-alpaca-finetune
This model is a fine-tuned version of mistralai/Mistral-7B-v0.1 on the mhenrichsen/alpaca_2k_test dataset. It achieves the following results on the evaluation set:
- Loss: 0.9808
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: 5e-06
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 10
- num_epochs: 3
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 0.9152 | 0.01 | 1 | 0.9037 |
| 0.9101 | 0.15 | 18 | 0.8461 |
| 0.7589 | 0.3 | 36 | 0.8437 |
| 0.8274 | 0.45 | 54 | 0.8441 |
| 0.7255 | 0.61 | 72 | 0.8435 |
| 0.85 | 0.76 | 90 | 0.8419 |
| 0.9083 | 0.91 | 108 | 0.8408 |
| 0.3208 | 1.06 | 126 | 0.9177 |
| 0.3738 | 1.21 | 144 | 0.8924 |
| 0.4034 | 1.36 | 162 | 0.8914 |
| 0.3936 | 1.51 | 180 | 0.9032 |
| 0.3188 | 1.66 | 198 | 0.9001 |
| 0.4331 | 1.82 | 216 | 0.8973 |
| 0.3946 | 1.97 | 234 | 0.8963 |
| 0.1531 | 2.12 | 252 | 0.9653 |
| 0.1741 | 2.27 | 270 | 0.9841 |
| 0.2371 | 2.42 | 288 | 0.9784 |
| 0.271 | 2.57 | 306 | 0.9801 |
| 0.2632 | 2.72 | 324 | 0.9808 |
| 0.1691 | 2.87 | 342 | 0.9808 |
Framework versions
- Transformers 4.35.2
- Pytorch 2.0.1+cu118
- Datasets 2.15.0
- Tokenizers 0.15.0
- Downloads last month
- 4
Model tree for dvijay/mistral-alpaca-finetune
Base model
mistralai/Mistral-7B-v0.1