Downloads · 30 days
4
36% of all-time downloads
ASAP-Decompile/asap-9b-v1
asap-9b-v1 is a machine learning model from ASAP-Decompile. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
4
36% of all-time downloads
All-time downloads
11
Public
Repo size
1.6 GB
Likes
0
Public
Click a slice to open those files.
.safetensors1.6 GB · 97%
From the Hugging Face model README
pip install -r requirements.txt
python infer.py
# Generate predictions
python eval.py generate \
--data_path eval_data/humaneval.jsonl \
--output_path humaneval-result.jsonl
# Score re-executability (requires gcc-11 on PATH)
python eval.py score \
--output_path humaneval-result.jsonl \
--testset_path eval_data/humaneval.jsonl \
--num_workers 8
For custom inputs:
import torch
import yaml
from safetensors.torch import load_file
from modeling_asap import AsmEncoderQformerLlm4decompile
with open("config.yaml") as f:
model_cfg = dict(yaml.safe_load(f)["model"])
model_cfg["asm_encoder_name"] = "stage1.safetensors"
state_dict = load_file("stage2.safetensors")
weights = {k: v for k, v in state_dict.items()
if not k.startswith(("asm_encoder", "asm_src_encoder"))}
model = AsmEncoderQformerLlm4decompile.from_config(cfg=model_cfg)
model.load_state_dict(weights, strict=False)
model = model.to("cuda:0").eval()
source, _ = model.generate(asm_raw, ghidra_pseudocode)
asm_raw is x86-64 assembly text; ghidra_pseudocode is the decompiler's
pseudocode for the same function.
This code repository is licensed under the MIT License.
@article{asap2026,
title = {ASAP: Assembly-Source Aligned Pseudocode Refinement For Binary Decompilation},
author = {Anonymous},
year = {2026},
}