Text Generation
Transformers
Safetensors
qwen2
code
qwen2.5
lora-merged
fine-tuned
text-generation-inference
Instructions to use Justin6657/PoPilot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Justin6657/PoPilot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Justin6657/PoPilot")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Justin6657/PoPilot") model = AutoModelForCausalLM.from_pretrained("Justin6657/PoPilot", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Justin6657/PoPilot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Justin6657/PoPilot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Justin6657/PoPilot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Justin6657/PoPilot
- SGLang
How to use Justin6657/PoPilot 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 "Justin6657/PoPilot" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Justin6657/PoPilot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Justin6657/PoPilot" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Justin6657/PoPilot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Justin6657/PoPilot with Docker Model Runner:
docker model run hf.co/Justin6657/PoPilot
| license: apache-2.0 | |
| base_model: Qwen/Qwen2.5-Coder-14B | |
| tags: | |
| - code | |
| - qwen2.5 | |
| - lora-merged | |
| - fine-tuned | |
| library_name: transformers | |
| # PoPilot - Fine-tuned Qwen2.5-Coder-14B | |
| This model is a fine-tuned version of [Qwen/Qwen2.5-Coder-14B](https://huggingface.co/Qwen/Qwen2.5-Coder-14B) with LoRA adapters merged. | |
| ## Model Details | |
| - **Base Model**: Qwen/Qwen2.5-Coder-14B | |
| - **Fine-tuning Method**: LoRA (Low-Rank Adaptation) | |
| - **Training**: Supervised Fine-Tuning (SFT) | |
| - **Merged**: Full model weights (LoRA merged with base) | |
| ## Usage | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| model = AutoModelForCausalLM.from_pretrained( | |
| "Justin6657/PoPilot", | |
| torch_dtype="auto", | |
| device_map="auto", | |
| trust_remote_code=True | |
| ) | |
| tokenizer = AutoTokenizer.from_pretrained( | |
| "Justin6657/PoPilot", | |
| trust_remote_code=True | |
| ) | |
| # Example usage | |
| prompt = "Write a Python function to calculate fibonacci numbers:" | |
| inputs = tokenizer(prompt, return_tensors="pt") | |
| outputs = model.generate(**inputs, max_length=200, temperature=0.7) | |
| response = tokenizer.decode(outputs[0], skip_special_tokens=True) | |
| print(response) | |
| ``` | |
| ## Training Details | |
| This model was fine-tuned using LoRA adapters and then merged back into the full model weights. | |
| Original LoRA checkpoint path: `/net/projects/CLS/DSI_clinic/justin/checkpoint/augmented_train_Qwen2.5-Coder-14B_full-model_repair-synth_repair-simple-phase4` | |