Instructions to use decaf-usenix/Decaf-Gen-1.3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use decaf-usenix/Decaf-Gen-1.3b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="decaf-usenix/Decaf-Gen-1.3b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("decaf-usenix/Decaf-Gen-1.3b") model = AutoModelForCausalLM.from_pretrained("decaf-usenix/Decaf-Gen-1.3b") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use decaf-usenix/Decaf-Gen-1.3b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "decaf-usenix/Decaf-Gen-1.3b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "decaf-usenix/Decaf-Gen-1.3b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/decaf-usenix/Decaf-Gen-1.3b
- SGLang
How to use decaf-usenix/Decaf-Gen-1.3b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "decaf-usenix/Decaf-Gen-1.3b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "decaf-usenix/Decaf-Gen-1.3b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "decaf-usenix/Decaf-Gen-1.3b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "decaf-usenix/Decaf-Gen-1.3b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use decaf-usenix/Decaf-Gen-1.3b with Docker Model Runner:
docker model run hf.co/decaf-usenix/Decaf-Gen-1.3b
Decaf-Gen-1.3b
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-1.3b-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-1.3b")
tokenizer = AutoTokenizer.from_pretrained("decaf-usenix/Decaf-Gen-1.3b")
Or via vLLM in the Decaf pipeline; see scripts/inference.py and the
configs/post_rebuttal_experiments/ours_base_1.3b/ 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
- 27
Model tree for decaf-usenix/Decaf-Gen-1.3b
Base model
LLM4Binary/llm4decompile-1.3b-v1.6