Instructions to use slenk/codewraith-lora-3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use slenk/codewraith-lora-3b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "slenk/codewraith-lora-3b") - Transformers
How to use slenk/codewraith-lora-3b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="slenk/codewraith-lora-3b") 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("slenk/codewraith-lora-3b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use slenk/codewraith-lora-3b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "slenk/codewraith-lora-3b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "slenk/codewraith-lora-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/slenk/codewraith-lora-3b
- SGLang
How to use slenk/codewraith-lora-3b 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 "slenk/codewraith-lora-3b" \ --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": "slenk/codewraith-lora-3b", "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 "slenk/codewraith-lora-3b" \ --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": "slenk/codewraith-lora-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use slenk/codewraith-lora-3b with Docker Model Runner:
docker model run hf.co/slenk/codewraith-lora-3b
Download checkpoint-84/optimizer.pt from slenk/codewraith-lora-3b: direct link, hf CLI and curl.
- Browser
- Download file 99.2 MB
-
https://huggingface.co/slenk/codewraith-lora-3b/resolve/main/checkpoint-84/optimizer.pt
- Command line
-
hf download hf://slenk/codewraith-lora-3b/checkpoint-84/optimizer.pt
-
curl -L -o optimizer.pt https://huggingface.co/slenk/codewraith-lora-3b/resolve/main/checkpoint-84/optimizer.pt
99.2 MB
- Xet hash:
- aacf935a97b095a8953cb03a1ff57fe31a83b4aed48ca8c500332350a671f075
- Size of remote file:
- 99.2 MB
- SHA256:
- 5650634684e032957534f6dcad7702d32bb733e8eadbb52a6f5723754c369548
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.