Downloads · 30 days
7
9% of all-time downloads
jagalindo/uvl-qwen2.5-coder-7b-sft-lora
uvl-qwen2.5-coder-7b-sft-lora is a text generation model from jagalindo. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
LoRA adapter that fine-tunes Qwen/Qwen2.5-Coder-7B-Instruct to generate UVL (Universal Variability Language) feature models from a domain description and structural constraints (feature count, cross-tree constraints,…
Downloads · 30 days
7
9% of all-time downloads
All-time downloads
82
Public
Repo size
196 MB
Likes
0
Public
Click a slice to open those files.
.safetensors185 MB · 94%
From the Hugging Face model README
LoRA adapter that fine-tunes Qwen/Qwen2.5-Coder-7B-Instruct
to generate UVL (Universal Variability Language) feature models from a domain
description and structural constraints (feature count, cross-tree constraints,
depth, UVL level).
Trained with fine-tunning-uvl on the good/bad generations
of the UVL_LLM_Guided_Generation benchmark, supervised on the valid (flamapy-
parseable) outputs with prompt masking.
Valid-UVL rate on a 62-prompt held-out test set (flamapy validator):
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = "Qwen/Qwen2.5-Coder-7B-Instruct"
tok = AutoTokenizer.from_pretrained("jagalindo/uvl-qwen2.5-coder-7b-sft-lora")
model = AutoModelForCausalLM.from_pretrained(base, dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(model, "jagalindo/uvl-qwen2.5-coder-7b-sft-lora")
messages = [
{"role": "system", "content": "You are an expert in Software Product Lines ... generate valid UVL ..."},
{"role": "user", "content": "## Your task\nGenerate a valid UVL feature model for ..."},
]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(model.device)
out = model.generate(**inputs, max_new_tokens=1536, do_sample=False)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
For best results, sample a few candidates and keep the first that parses with flamapy (retry-until-valid).
Small/medium model on a niche DSL; not every generation parses on the first try. Use retry-until-valid + the project's light post-processing (dedup feature names, drop dangling constraints, quote non-identifier namespaces) to reach the headline rate.
Part of the fine-tunning-uvl
project — three artifacts from the same training run, all based on
Qwen/Qwen2.5-Coder-7B-Instruct:
jagalindo/uvl-qwen2.5-coder-7b-sft-lora — this adapter: SFT LoRA (apply on the full-precision base; recommended checkpoint)jagalindo/uvl-qwen2.5-coder-7b-sft-merged — merged bf16 full model (CUDA-ready, transformers)jagalindo/uvl-qwen2.5-coder-7b-sft — fused full model (MLX 4-bit, runs standalone via mlx-lm)jagalindo/uvl-qwen2.5-coder-7b-dpo-lora — DPO LoRA adapter (experimental; regressed vs SFT)