How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="PrathamMMallya99/textilenet-qwen-lora")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("PrathamMMallya99/textilenet-qwen-lora", dtype="auto")
Quick Links

Usage

To use this model, run the following code cell:

import torch
from peft import PeftModel
from transformers import Qwen2VLForConditionalGeneration

# 1. Load the Base Vision-Language Model
base_model = Qwen2VLForConditionalGeneration.from_pretrained(
    "Qwen/Qwen2-VL-2B-Instruct",
    torch_dtype=torch.float16,  # Recommended to save memory
    device_map="auto"           # Automatically dispatches to GPU
)

# 2. Apply your trained LoRA adapter
model = PeftModel.from_pretrained(base_model, "PrathamMMallya99/textilenet-qwen-lora")
model.eval()

print("Successfully loaded VLM and LoRA adapter!")
Downloads last month
101
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for PrathamMMallya99/textilenet-qwen-lora

Base model

Qwen/Qwen2-VL-2B
Adapter
(163)
this model