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="akshatkot/linus-coder")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("akshatkot/linus-coder")
model = AutoModelForCausalLM.from_pretrained("akshatkot/linus-coder", device_map="auto")
messages = [
    {"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

Linus Coder

A Qwen2.5-Coder-7B model fine-tuned with LoRA to review Linux kernel patches in the blunt, deeply technical style of Linus Torvalds.

Intended Use

Feed a patch diff and get a Linus-style review ending with Verdict: <approve|request_changes|reject|question>.

Input format

Reviewer style target: linus-torvalds
Subsystem: <subsystem>
Patch subject: <subject>

<patch diff>

Write your review of this patch.
End your review with exactly: Verdict: <approve|request_changes|reject|question>

Usage (merged model)

from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("akshatkot/linus-coder")
model = AutoModelForCausalLM.from_pretrained("akshatkot/linus-coder", torch_dtype=torch.float16)

Training

Fine-tuned with Unsloth SFTTrainer, 2 epochs, lr=1e-4, cosine schedule on LKML patch reviews.

License

MIT

Downloads last month
149
Safetensors
Model size
8B params
Tensor type
BF16
·
U8
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for akshatkot/linus-coder