Text Generation
Transformers
PyTorch
TensorBoard
llama
LoRA
QLoRa
Merged LoRA Model
text-generation-inference
Instructions to use richardr1126/sql-guanaco-13b-merged with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use richardr1126/sql-guanaco-13b-merged with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="richardr1126/sql-guanaco-13b-merged")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("richardr1126/sql-guanaco-13b-merged") model = AutoModelForCausalLM.from_pretrained("richardr1126/sql-guanaco-13b-merged") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use richardr1126/sql-guanaco-13b-merged with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "richardr1126/sql-guanaco-13b-merged" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "richardr1126/sql-guanaco-13b-merged", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/richardr1126/sql-guanaco-13b-merged
- SGLang
How to use richardr1126/sql-guanaco-13b-merged 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 "richardr1126/sql-guanaco-13b-merged" \ --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": "richardr1126/sql-guanaco-13b-merged", "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 "richardr1126/sql-guanaco-13b-merged" \ --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": "richardr1126/sql-guanaco-13b-merged", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use richardr1126/sql-guanaco-13b-merged with Docker Model Runner:
docker model run hf.co/richardr1126/sql-guanaco-13b-merged
metadata
tags:
- LoRA
- QLoRa
- Merged LoRA Model
model-index:
- name: sql-guanaco-13b-merged
results: []
datasets:
- richardr1126/sql-create-context_guanaco_style
spaces:
- richardr1126/sql-guanaco-13b-demo
sql-guanaco-13b-merged
- This is a merged LoRA model that can be used with AutoModelForCausalLM or LlamaModelForCausalLM.
- It is a combination of richardr1126/guanaco-13b-merged + richardr1126/lora-sql-guanaco-13b-adapter.
- This LoRA was fine-tuned using QLoRA techniques on the richardr1126/sql-create-context_guanaco_style dataset.
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0002
- train_batch_size: 4
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 16
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.03
- training_steps: 1875
- mixed_precision_training: Native AMP
Framework versions
- Transformers 4.30.0.dev0
- Pytorch 2.0.1+cu118
- Datasets 2.13.0
- Tokenizers 0.13.3
Citation
@article{dettmers2023qlora,
title={QLoRA: Efficient Finetuning of Quantized LLMs},
author={Dettmers, Tim and Pagnoni, Artidoro and Holtzman, Ari and Zettlemoyer, Luke},
journal={arXiv preprint arXiv:2305.14314},
year={2023}
}