Instructions to use BeDream/tuning-lora-tinyllama-1.1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use BeDream/tuning-lora-tinyllama-1.1b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0") model = PeftModel.from_pretrained(base_model, "BeDream/tuning-lora-tinyllama-1.1b") - Transformers
How to use BeDream/tuning-lora-tinyllama-1.1b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BeDream/tuning-lora-tinyllama-1.1b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("BeDream/tuning-lora-tinyllama-1.1b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use BeDream/tuning-lora-tinyllama-1.1b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BeDream/tuning-lora-tinyllama-1.1b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BeDream/tuning-lora-tinyllama-1.1b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/BeDream/tuning-lora-tinyllama-1.1b
- SGLang
How to use BeDream/tuning-lora-tinyllama-1.1b 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 "BeDream/tuning-lora-tinyllama-1.1b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BeDream/tuning-lora-tinyllama-1.1b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "BeDream/tuning-lora-tinyllama-1.1b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BeDream/tuning-lora-tinyllama-1.1b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use BeDream/tuning-lora-tinyllama-1.1b with Docker Model Runner:
docker model run hf.co/BeDream/tuning-lora-tinyllama-1.1b
Download training_args.bin from BeDream/tuning-lora-tinyllama-1.1b: direct link, hf CLI and curl.
- Browser
- Download file 5.71 kB
-
https://huggingface.co/BeDream/tuning-lora-tinyllama-1.1b/resolve/main/training_args.bin
- Command line
-
hf download hf://BeDream/tuning-lora-tinyllama-1.1b/training_args.bin
-
curl -L -o training_args.bin https://huggingface.co/BeDream/tuning-lora-tinyllama-1.1b/resolve/main/training_args.bin
5.71 kB
- Xet hash:
- 0a6d74ac1e44fcd282fe77b168dacaf760fd034b34a2b1497603b09edb0c0382
- Size of remote file:
- 5.71 kB
- SHA256:
- e0ca68cec25a862eb4bcfdc5d138c3e3acc41c55232084021386437bc15234be
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.