Instructions to use georgebu/peft_lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use georgebu/peft_lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="georgebu/peft_lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("georgebu/peft_lora") model = AutoModelForCausalLM.from_pretrained("georgebu/peft_lora", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use georgebu/peft_lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "georgebu/peft_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": "georgebu/peft_lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/georgebu/peft_lora
- SGLang
How to use georgebu/peft_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 "georgebu/peft_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": "georgebu/peft_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 "georgebu/peft_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": "georgebu/peft_lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use georgebu/peft_lora with Docker Model Runner:
docker model run hf.co/georgebu/peft_lora
|
Download README.md from georgebu/peft_lora: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/georgebu/peft_lora/resolve/main/README.md
- Command line
-
hf download hf://georgebu/peft_lora/README.md
-
curl -L -o README.md https://huggingface.co/georgebu/peft_lora/resolve/main/README.md
1.18 kB
| library_name: transformers | |
| datasets: | |
| - cardiffnlp/tweet_eval | |
| language: | |
| - en | |
| metrics: | |
| - f1 | |
| base_model: | |
| - OuteAI/Lite-Oute-1-300M-Instruct | |
| # О модели | |
| Модель OuteAI/Lite-Oute-1-300M-Instruct, дообученная с помощью адаптера LoRA, предназначена для оценки тональности сообщений пользователей. Дообучена на датасете "cardiffnlp/tweet_eval", определяя тональность твитов. | |
| # Метрика качества модели | |
| Результат после дообучения: macro F1: 0.53 (обучалась две эпохи, ранг r = 16) | |
| # Примеры использования | |
| <div style=" | |
| background: #1a2639; | |
| padding: 14px; | |
| border-radius: 6px; | |
| border-left: 3px solid #3a86ff; | |
| color: #e0e0e0; | |
| font-family: 'Consolas', monospace; | |
| margin: 16px 0; | |
| "> | |
| <b>Промт:</b> "you look cute" | |
| <b>Ответ модели:</b> | |
| positive | |
| <b>Промт:</b> "i hate videogames" | |
| <b>Ответ модели:</b> | |
| negative | |
| <b>Промт:</b> "now im going to the shop" | |
| <b>Ответ модели:</b> | |
| neutral | |
| </div> |