Instructions to use slenk/codewraith-lora-8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use slenk/codewraith-lora-8b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/llama-3.1-8b-instruct-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "slenk/codewraith-lora-8b") - Transformers
How to use slenk/codewraith-lora-8b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="slenk/codewraith-lora-8b") 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-8b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use slenk/codewraith-lora-8b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "slenk/codewraith-lora-8b" # 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-8b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/slenk/codewraith-lora-8b
- SGLang
How to use slenk/codewraith-lora-8b 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-8b" \ --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-8b", "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-8b" \ --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-8b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use slenk/codewraith-lora-8b with Docker Model Runner:
docker model run hf.co/slenk/codewraith-lora-8b
v5: Qwen2.5-Coder 32B teacher, 0.99 structural score
Browse filesFiles changed (3)
12345675 unmodified lines13141516171819---base_model: unsloth/llama-3.1-8b-instruct-unsloth-bnb-4bitlibrary_name: peftmodel_name: codewraith-lora-8b-v4tags:- base_model:adapter:unsloth/llama-3.1-8b-instruct-unsloth-bnb-4bit- lora5 unmodified linespipeline_tag: text-generation---# Model Card for codewraith-lora-8b-v4This model is a fine-tuned version of [unsloth/llama-3.1-8b-instruct-unsloth-bnb-4bit](https://huggingface.co/unsloth/llama-3.1-8b-instruct-unsloth-bnb-4bit).It has been trained using [TRL](https://github.com/huggingface/trl).12345675 unmodified lines13141516171819---base_model: unsloth/llama-3.1-8b-instruct-unsloth-bnb-4bitlibrary_name: peftmodel_name: codewraith-lora-8b-v5tags:- base_model:adapter:unsloth/llama-3.1-8b-instruct-unsloth-bnb-4bit- lora5 unmodified linespipeline_tag: text-generation---# Model Card for codewraith-lora-8b-v5This model is a fine-tuned version of [unsloth/llama-3.1-8b-instruct-unsloth-bnb-4bit](https://huggingface.co/unsloth/llama-3.1-8b-instruct-unsloth-bnb-4bit).It has been trained using [TRL](https://github.com/huggingface/trl).
32 unmodified lines3334353637383940414243444532 unmodified lines"rank_pattern": {},"revision": null,"target_modules": ["o_proj","up_proj","q_proj","gate_proj","down_proj","v_proj","k_proj"],"target_parameters": null,"task_type": "CAUSAL_LM",32 unmodified lines3334353637383940414243444532 unmodified lines"rank_pattern": {},"revision": null,"target_modules": ["k_proj","v_proj","gate_proj","q_proj","o_proj","down_proj","up_proj"],"target_parameters": null,"task_type": "CAUSAL_LM",
123version https://git-lfs.github.com/spec/v1oid sha256:8e9258ee357c281cb3edcad0a5cce75bf900f54044d7697164627ba624532350size 335604696123version https://git-lfs.github.com/spec/v1oid sha256:7180fba4ab9fe8d0a35620a14a030672db404daf68d9156f61cfe6eaf39105d5size 335604696
README.md+2-2
adapter_config.json+5-5
adapter_model.safetensors+1-1