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="decaf-usenix/Decaf-Gen-6.7b")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("decaf-usenix/Decaf-Gen-6.7b")
model = AutoModelForCausalLM.from_pretrained("decaf-usenix/Decaf-Gen-6.7b", 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=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

Decaf-Gen-6.7b

Fine-tuned LLM for binary decompilation, part of the Decaf pipeline.

This is the Decaf-Gen generator that produces candidate decompilations from Ghidra-decompiled source. It was fine-tuned on top of LLM4Binary/llm4decompile-6.7b-v1.6 on a merged stripped/unstripped corpus and stopped on the stripped half (the *_stripped_stop checkpoint family from the Decaf paper).

Use

from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("decaf-usenix/Decaf-Gen-6.7b")
tokenizer = AutoTokenizer.from_pretrained("decaf-usenix/Decaf-Gen-6.7b")

Or via vLLM in the Decaf pipeline; see scripts/inference.py and the configs/post_rebuttal_experiments/ours_base_6.7b/ configs in the Decaf release repo.

Companion repos

Repo Role
decaf-usenix/Decaf-Gen-1.3b / -6.7b / -22b Generator at three scales
decaf-usenix/Decaf-ReRanker-32b-stripped Reranker (stripped)
decaf-usenix/Decaf-ReRanker-32b-unstripped Reranker (unstripped)
decaf-usenix/Decaf-Test-Sets ExeBench evaluation sets
decaf-usenix/Decaf-Juliet-Funceval Juliet vulnerability-detection eval inputs

Run scripts/download.sh --all from the release repo to fetch everything.

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

Model tree for decaf-usenix/Decaf-Gen-6.7b

Finetuned
(1)
this model