Instructions to use adamabuhamdan/tinyllama-sql-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use adamabuhamdan/tinyllama-sql-lora 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, "adamabuhamdan/tinyllama-sql-lora") - Transformers
How to use adamabuhamdan/tinyllama-sql-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="adamabuhamdan/tinyllama-sql-lora") 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("adamabuhamdan/tinyllama-sql-lora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use adamabuhamdan/tinyllama-sql-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "adamabuhamdan/tinyllama-sql-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "adamabuhamdan/tinyllama-sql-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/adamabuhamdan/tinyllama-sql-lora
- SGLang
How to use adamabuhamdan/tinyllama-sql-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 "adamabuhamdan/tinyllama-sql-lora" \ --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": "adamabuhamdan/tinyllama-sql-lora", "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 "adamabuhamdan/tinyllama-sql-lora" \ --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": "adamabuhamdan/tinyllama-sql-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use adamabuhamdan/tinyllama-sql-lora with Docker Model Runner:
docker model run hf.co/adamabuhamdan/tinyllama-sql-lora
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
# Model Card for Model ID
|
|
@@ -15,7 +22,7 @@ tags: []
|
|
| 15 |
|
| 16 |
<!-- Provide a longer summary of what this model is. -->
|
| 17 |
|
| 18 |
-
|
| 19 |
|
| 20 |
- **Developed by:** [More Information Needed]
|
| 21 |
- **Funded by [optional]:** [More Information Needed]
|
|
@@ -196,4 +203,7 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
|
|
| 196 |
|
| 197 |
## Model Card Contact
|
| 198 |
|
| 199 |
-
[More Information Needed]
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
|
| 3 |
+
library_name: peft
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
tags:
|
| 6 |
+
- base_model:adapter:TinyLlama/TinyLlama-1.1B-Chat-v1.0
|
| 7 |
+
- lora
|
| 8 |
+
- sft
|
| 9 |
+
- transformers
|
| 10 |
+
- trl
|
| 11 |
---
|
| 12 |
|
| 13 |
# Model Card for Model ID
|
|
|
|
| 22 |
|
| 23 |
<!-- Provide a longer summary of what this model is. -->
|
| 24 |
|
| 25 |
+
|
| 26 |
|
| 27 |
- **Developed by:** [More Information Needed]
|
| 28 |
- **Funded by [optional]:** [More Information Needed]
|
|
|
|
| 203 |
|
| 204 |
## Model Card Contact
|
| 205 |
|
| 206 |
+
[More Information Needed]
|
| 207 |
+
### Framework versions
|
| 208 |
+
|
| 209 |
+
- PEFT 0.18.1
|