Instructions to use dvijay/mistral-alpaca2k-3e-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dvijay/mistral-alpaca2k-3e-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dvijay/mistral-alpaca2k-3e-lora")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dvijay/mistral-alpaca2k-3e-lora") model = AutoModelForCausalLM.from_pretrained("dvijay/mistral-alpaca2k-3e-lora") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use dvijay/mistral-alpaca2k-3e-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dvijay/mistral-alpaca2k-3e-lora" # 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-alpaca2k-3e-lora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/dvijay/mistral-alpaca2k-3e-lora
- SGLang
How to use dvijay/mistral-alpaca2k-3e-lora 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-alpaca2k-3e-lora" \ --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-alpaca2k-3e-lora", "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-alpaca2k-3e-lora" \ --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-alpaca2k-3e-lora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use dvijay/mistral-alpaca2k-3e-lora with Docker Model Runner:
docker model run hf.co/dvijay/mistral-alpaca2k-3e-lora
mistral-alpaca2k-3e
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.8850
Training procedure
accelerate launch -m axolotl.cli.train examples/mistral/qlora.yml
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0002
- train_batch_size: 2
- eval_batch_size: 2
- seed: 42
- gradient_accumulation_steps: 4
- 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: 10
- num_epochs: 3
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.392 | 0.0 | 1 | 1.2581 |
| 0.912 | 0.15 | 36 | 0.7686 |
| 0.7114 | 0.3 | 72 | 0.7590 |
| 0.7849 | 0.45 | 108 | 0.7561 |
| 0.693 | 0.61 | 144 | 0.7546 |
| 0.686 | 0.76 | 180 | 0.7538 |
| 0.782 | 0.91 | 216 | 0.7524 |
| 0.5691 | 1.06 | 252 | 0.7700 |
| 0.5295 | 1.21 | 288 | 0.7883 |
| 0.5313 | 1.36 | 324 | 0.7876 |
| 0.4994 | 1.52 | 360 | 0.7971 |
| 0.6007 | 1.67 | 396 | 0.7881 |
| 0.5459 | 1.82 | 432 | 0.7911 |
| 0.5194 | 1.97 | 468 | 0.7924 |
| 0.3376 | 2.12 | 504 | 0.8711 |
| 0.2983 | 2.27 | 540 | 0.8916 |
| 0.341 | 2.43 | 576 | 0.8891 |
| 0.2961 | 2.58 | 612 | 0.8861 |
| 0.2469 | 2.73 | 648 | 0.8860 |
| 0.3535 | 2.88 | 684 | 0.8850 |
Framework versions
- Transformers 4.35.2
- Pytorch 2.0.1+cu118
- Datasets 2.15.0
- Tokenizers 0.15.0
- Downloads last month
- 7
Model tree for dvijay/mistral-alpaca2k-3e-lora
Base model
mistralai/Mistral-7B-v0.1