Instructions to use alchin2/lora-project with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use alchin2/lora-project with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct") model = PeftModel.from_pretrained(base_model, "alchin2/lora-project") - Transformers
How to use alchin2/lora-project with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="alchin2/lora-project") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("alchin2/lora-project", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use alchin2/lora-project with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "alchin2/lora-project" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "alchin2/lora-project", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/alchin2/lora-project
- SGLang
How to use alchin2/lora-project 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 "alchin2/lora-project" \ --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": "alchin2/lora-project", "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 "alchin2/lora-project" \ --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": "alchin2/lora-project", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use alchin2/lora-project with Docker Model Runner:
docker model run hf.co/alchin2/lora-project
LoRA Project
This repository contains a PEFT LoRA adapter for personalized email-style generation.
The adapter was trained from Qwen/Qwen2.5-1.5B-Instruct using project-specific
style examples exported from the ACM personalization pipeline.
This is not a standalone full model. Load it together with the base model.
Base Model
Qwen/Qwen2.5-1.5B-Instruct
Intended Use
The adapter is intended for class project experimentation with personalized writing style generation. It can be used with the companion GitHub project to generate email-style responses from a selected user's profile and prompt.
Project repo:
https://github.com/AryanAGit/LLM_Personalization---ACM-AI-Team4
Loading The Adapter
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = "Qwen/Qwen2.5-1.5B-Instruct"
adapter_id = "alchin2/lora-project"
tokenizer = AutoTokenizer.from_pretrained(base_model)
model = AutoModelForCausalLM.from_pretrained(base_model)
model = PeftModel.from_pretrained(model, adapter_id)
Local App Usage
From the GitHub project directory, run:
python3 project.py generate \
--history data/processed/user_email_history.json \
--backend peft \
--base-model Qwen/Qwen2.5-1.5B-Instruct \
--adapter-path alchin2/lora-project \
--prompt "Write an email asking Wendy to send the files by Wednesday."
Or start the local web app:
python3 run_app.py
Then open http://127.0.0.1:8787.
Evaluation
Recommended evaluation methods for this project:
- Automatic metrics from the project evaluation command, including style distance, greeting/signoff matching, length ratio, word overlap, and profile copy risk.
- LaMP-style personalization evaluation, comparing outputs with and without user profile context.
- Blind LLM or human ranking across base model, RAG, LoRA, and RAG+LoRA outputs.
Limitations
The adapter is trained for style imitation experiments and may overfit small user profiles. Outputs should be checked for prompt faithfulness, fluency, and copying from training examples.
- Downloads last month
- 152