Instructions to use sagedsama/lora_practice with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use sagedsama/lora_practice with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B-Instruct") model = PeftModel.from_pretrained(base_model, "sagedsama/lora_practice") - Transformers
How to use sagedsama/lora_practice with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sagedsama/lora_practice") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("sagedsama/lora_practice", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use sagedsama/lora_practice with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sagedsama/lora_practice" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sagedsama/lora_practice", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sagedsama/lora_practice
- SGLang
How to use sagedsama/lora_practice 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 "sagedsama/lora_practice" \ --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": "sagedsama/lora_practice", "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 "sagedsama/lora_practice" \ --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": "sagedsama/lora_practice", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use sagedsama/lora_practice with Docker Model Runner:
docker model run hf.co/sagedsama/lora_practice
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,11 +8,18 @@ tags:
|
|
| 8 |
- sft
|
| 9 |
- transformers
|
| 10 |
- trl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
# Model Card for Model ID
|
| 14 |
|
| 15 |
<!-- Provide a quick summary of what the model is/does. -->
|
|
|
|
| 16 |
|
| 17 |
|
| 18 |
|
|
|
|
| 8 |
- sft
|
| 9 |
- transformers
|
| 10 |
- trl
|
| 11 |
+
license: mit
|
| 12 |
+
datasets:
|
| 13 |
+
- Muennighoff/mbpp
|
| 14 |
+
- sahil2801/CodeAlpaca-20k
|
| 15 |
+
language:
|
| 16 |
+
- en
|
| 17 |
---
|
| 18 |
|
| 19 |
# Model Card for Model ID
|
| 20 |
|
| 21 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 22 |
+
Only when asked to write code, it'll write that code. It doesn't have any other capabilities
|
| 23 |
|
| 24 |
|
| 25 |
|