Views
No views yet
Note: This repository contains only the LoRA adapter weights, not the full model. You must have access to the base model to use this adapter.
1import torch
2from peft import PeftModel
3from transformers import AutoModelForCausalLM, AutoTokenizer
4
5# Load base model
6base_model = AutoModelForCausalLM.from_pretrained(
7 "Qwen/Qwen2.5-3B-Instruct",
8 torch_dtype=torch.float16,
9 device_map="auto"
10)
11
12# Load adapter
13model = PeftModel.from_pretrained(
14 base_model,
15 "Bioaligned/Qwen-2.5-3B-instruct-bioaligned-qlora"
16)
17
18# Load tokenizer
19tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-3B-Instruct")
20
21# Generate
22inputs = tokenizer("Your prompt here", return_tensors="pt").to(model.device)
23outputs = model.generate(**inputs, max_new_tokens=256)
24print(tokenizer.decode(outputs[0], skip_special_tokens=True))| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen2.5-3B-Instruct |
| Method | QLoRA (4-bit NF4 quantization) |
| LoRA rank | 16 |
| LoRA alpha | 32 |
| Target modules | All attention and MLP layers |
| Learning rate | 1e-5 |
| Epochs | 3 |
| Training format | Instruction-tuned only |
| Corpus | ~6M tokens from PMC Open Access papers |
| Metric | Base | Bioaligned | Change |
|---|---|---|---|
| Delta p_up (valence) | -0.111 | -0.056 | +51% |
[TODO: Add citation when paper is published]