Text Generation
Transformers
Safetensors
mistral
Generated from Trainer
text-generation-inference
8-bit precision
bitsandbytes
Instructions to use corbt/example-mistral-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use corbt/example-mistral-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="corbt/example-mistral-lora")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("corbt/example-mistral-lora") model = AutoModelForCausalLM.from_pretrained("corbt/example-mistral-lora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use corbt/example-mistral-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "corbt/example-mistral-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "corbt/example-mistral-lora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/corbt/example-mistral-lora
- SGLang
How to use corbt/example-mistral-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 "corbt/example-mistral-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": "corbt/example-mistral-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 "corbt/example-mistral-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": "corbt/example-mistral-lora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use corbt/example-mistral-lora with Docker Model Runner:
docker model run hf.co/corbt/example-mistral-lora
| license: apache-2.0 | |
| base_model: OpenPipe/mistral-ft-optimized-1227 | |
| tags: | |
| - generated_from_trainer | |
| model-index: | |
| - name: models/loras2/7bdb17d0-3f6b-4921-93db-0f46c4d9d81b | |
| results: [] | |
| <!-- This model card has been generated automatically according to the information the Trainer had access to. You | |
| should probably proofread and complete it, then remove this comment. --> | |
| [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl) | |
| # models/loras2/7bdb17d0-3f6b-4921-93db-0f46c4d9d81b | |
| This model is a fine-tuned version of [OpenPipe/mistral-ft-optimized-1227](https://huggingface.co/OpenPipe/mistral-ft-optimized-1227) on the None dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 0.0179 | |
| ## 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: 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: 2 | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | | |
| |:-------------:|:-----:|:----:|:---------------:| | |
| | 0.4795 | 0.02 | 1 | 0.4746 | | |
| | 0.0282 | 0.2 | 12 | 0.0309 | | |
| | 0.0168 | 0.4 | 24 | 0.0242 | | |
| | 0.0216 | 0.59 | 36 | 0.0208 | | |
| | 0.0167 | 0.79 | 48 | 0.0189 | | |
| | 0.0157 | 0.99 | 60 | 0.0186 | | |
| | 0.0156 | 1.19 | 72 | 0.0177 | | |
| | 0.0135 | 1.38 | 84 | 0.0182 | | |
| | 0.0139 | 1.58 | 96 | 0.0178 | | |
| | 0.0169 | 1.78 | 108 | 0.0178 | | |
| | 0.0111 | 1.98 | 120 | 0.0179 | | |
| ### Framework versions | |
| - Transformers 4.34.1 | |
| - Pytorch 2.0.1+cu117 | |
| - Datasets 2.14.6 | |
| - Tokenizers 0.14.1 | |