Important Caveats
This is not a conventional supervised fine-tune on rust-lightning examples. It
is a repository-conditioned adapter generated by the Code2LoRA hypernetwork.
The released Code2LoRA checkpoint was trained/evaluated on Python repositories,
so Rust/LDK quality should be treated as experimental.
For chat use, prefer the GGUF instruct variant in
benthecarman/rust-lightning-code2lora-gguf.
Local Use
from peft import PeftModelfrom transformers import AutoModelForCausalLM, AutoTokenizer base = "Qwen/Qwen2.5-Coder-1.5B"adapter = "benthecarman/rust-lightning-code2lora-adapter" tokenizer = AutoTokenizer.from_pretrained(base)model = AutoModelForCausalLM.from_pretrained(base, device_map="auto")model = PeftModel.from_pretrained(model, adapter)
Provenance
- Target repository:
lightningdevkit/rust-lightning
- Local source commit used during generation:
5049f7c02
- Code2LoRA checkpoint:
code2lora/code2lora-direct
- Rank: 16
- Alpha: 32