Text Generation
Transformers
PyTorch
Safetensors
English
t5
text2text-generation
text-generation-inference
Instructions to use VMware/flan-ul2-alpaca-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use VMware/flan-ul2-alpaca-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="VMware/flan-ul2-alpaca-lora")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("VMware/flan-ul2-alpaca-lora") model = AutoModelForSeq2SeqLM.from_pretrained("VMware/flan-ul2-alpaca-lora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use VMware/flan-ul2-alpaca-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "VMware/flan-ul2-alpaca-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VMware/flan-ul2-alpaca-lora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/VMware/flan-ul2-alpaca-lora
- SGLang
How to use VMware/flan-ul2-alpaca-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 "VMware/flan-ul2-alpaca-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": "VMware/flan-ul2-alpaca-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 "VMware/flan-ul2-alpaca-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": "VMware/flan-ul2-alpaca-lora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use VMware/flan-ul2-alpaca-lora with Docker Model Runner:
docker model run hf.co/VMware/flan-ul2-alpaca-lora
Commit ·
cbf40e1
1
Parent(s): 3f5cf16
Update README.md
Browse files
README.md
CHANGED
|
@@ -22,7 +22,9 @@ license: other
|
|
| 22 |
|
| 23 |
We take the instruction-tuned Flan models (trained on Academic datasets) and perform style transfer using the Alpaca dataset.
|
| 24 |
|
| 25 |
-
We released the code for LORA fine-tuning Seq2Seq models
|
|
|
|
|
|
|
| 26 |
|
| 27 |
We fine-tuned the `google/flan-ul2` model on the Alpaca dataset using [PEFT-LORA](https://huggingface.co/docs/diffusers/main/en/training/lora).
|
| 28 |
|
|
|
|
| 22 |
|
| 23 |
We take the instruction-tuned Flan models (trained on Academic datasets) and perform style transfer using the Alpaca dataset.
|
| 24 |
|
| 25 |
+
We released the code for LORA fine-tuning Seq2Seq models along with code walkthrough medium article here:
|
| 26 |
+
- https://github.com/vmware-labs/research-and-development-artificial-intelligence-lab/tree/main/instruction-tuning/peft-seq2seq
|
| 27 |
+
- https://medium.com/vmware-data-ml-blog/lora-finetunning-of-ul-2-and-t5-models-35a08863593d
|
| 28 |
|
| 29 |
We fine-tuned the `google/flan-ul2` model on the Alpaca dataset using [PEFT-LORA](https://huggingface.co/docs/diffusers/main/en/training/lora).
|
| 30 |
|