anaksor-ocr
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Recovers math equations from compiled binary code with a small neural decompiler, and ships the datasets and trained models from its paper. For reverse engineers and researchers.
REMEND is a kit in the Research category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.
pip install -U huggingface_hub hf download udiboy1209/REMEND
REMEND is a neural decompiler that turns compiled code for math equations back into the equations themselves. This repository holds the synthetic datasets, the datasets built from open-source programs and the trained models from the paper. Older tools either miss the meaning of the code or need slow dynamic analysis, and REMEND aims to recover data flow and order of operations.
It suits people who study binaries that implement formulas, and researchers who build or compare neural decompilers. The record lists English.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Security research | Reverse engineers | Recover the formula inside a compiled function | Turn a disassembled routine back into an equation |
| Embedded systems | Firmware engineers | Read numeric routines in binaries when source is missing | Check what a compiled calculation does |
| Academia | Machine learning researchers | Train or compare neural decompilers on the released datasets | Retrain a model with fairseq-train |
People who need whole programs decompiled into full source code can skip it, since REMEND targets math equations.
| Use case | Who | What they get back |
|---|---|---|
| Try the trained models | Researchers | Generated equations for disassembled functions |
| Train new models | ML engineers | Models trained on the synthetic dataset with fairseq |
| Compare related work | Paper authors | Scripts that evaluate BTC, SLaDE and Nova |
You need a few things first.
pip install -U huggingface_hub hf download udiboy1209/REMEND
To rebuild the synthetic dataset, download the FAIR prim_fwd archive from the Deep Learning for Symbolic Math paper, then run these steps.
tar xvf prim_fwd.tar.gz ./compile.sh ./combine.sh ./tokenize.sh
To test on open-source programs, you run three scripts in order. The dataset lands in a dataset folder and the results in a generated folder.
make.sh python3 collect_dataset.py generate.sh
To run a trained model on a tokenized dataset, use fairseq-generate.
fairseq-generate <tokenized-dataset> --task translation --arch transformer \
--max-source-positions 1024 --max-target-positions 1024 \
--path <checkpoint> --results-path <out-dir> --gen-subset <train/test/valid> --beam 1| Tool | What it does |
|---|---|
| dataset.zip | Holds the compiled equations and assembly |
| tokenized.zip | Holds the tokenized assembly, already prepared with fairseq-preprocess |
| make.sh | Compiles the open-source programs into ELF and assembly files |
| collect_dataset.py | Disassembles the ELF functions for REMEND to process |
| generate.sh | Runs REMEND, generates equations and checks them for correctness |
| fairseq-generate | Runs a trained model and writes its translations |
You compile the open-source programs with make.sh, disassemble them with collect_dataset.py, then run generate.sh. REMEND writes an equation for each function and scores it for correctness, and the results appear in text files under the generated folder, one set per architecture.
Decompiling means turning machine code back into something readable. REMEND focuses on formulas. A first small step is to download the repository and look inside tokenized.zip, which holds assembly already prepared for the model.
The model is a small transformer encoder-decoder, up to 12 million parameters, paired with algorithmic processing for symbolic reasoning. In its tests a single model scored 89.8 to 92.4 percent, covering three CPU instruction sets, three compiler optimization levels and two languages. On code from open-source programs it reports 8 percent higher accuracy than other neural decompilers, at about 0.132 seconds per function.
To train a model, the card gives one fairseq command, run with different parameters for each model.
fairseq-train <tokenized-dataset> --task translation --arch transformer \
--optimizer adam --weight-decay 0.001 --lr 0.0005 --lr-scheduler inverse_sqrt \
--max-source-positions 1024 --max-target-positions 1024 \
--encoder-attention-heads 8 --decoder-attention-heads 8 --encoder-embed-dim 384 --decoder-embed-dim 128 \
--encoder-ffn-embed-dim 1536 --decoder-ffn-embed-dim 512 --decoder-output-dim 128 --dropout 0.05 \
--max-tokens 20000 --max-update 100000 \
--no-epoch-checkpoints --keep-best-checkpoints 3 \
--save-dir <save-dir> --log-file <save-dir>/training.logRecovers math equations from compiled binary code with a small neural decompiler, and ships the datasets and trained models from its paper. For reverse engineers and researchers.
Made by udiboy1209 on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.
What it is: REMEND is a neural decompiler that turns compiled code for math equations back into the equations themselves. This repository holds the synthetic datasets, the datasets built from open-source programs and the trained models from the paper. Older tools either miss the meaning of the code or need slow dynamic analysis, and REMEND aims to recover data flow and order of operations.
Who it suits: It suits people who study binaries that implement formulas, and researchers who build or compare neural decompilers. The record lists English.
Industry | Who uses it | How they use it | Example
Security research | Reverse engineers | Recover the formula inside a compiled function | Turn a disassembled routine back into an equation
Embedded systems | Firmware engineers | Read numeric routines in binaries when source is missing | Check what a compiled calculation does
Academia | Machine learning researchers | Train or compare neural decompilers on the released datasets | Retrain a model with fairseq-train
People who need whole programs decompiled into full source code can skip it, since REMEND targets math equations.
Where to use it:
Use case | Who | What they get back
Try the trained models | Researchers | Generated equations for disassembled functions
Train new models | ML engineers | Models trained on the synthetic dataset with fairseq
Compare related work | Paper authors | Scripts that evaluate BTC, SLaDE and Nova
How to set it up: You need a few things first.
pip install -U huggingface_hub
hf download udiboy1209/REMEND
To rebuild the synthetic dataset, download the FAIR prim_fwd archive from the Deep Learning for Symbolic Math paper, then run these steps.
tar xvf prim_fwd.tar.gz
./compile.sh
./combine.sh
./tokenize.sh
How to use it: To test on open-source programs, you run three scripts in order. The dataset lands in a dataset folder and the results in a generated folder.
make.sh
python3 collect_dataset.py
generate.sh
To run a trained model on a tokenized dataset, use fairseq-generate.
fairseq-generate <tokenized-dataset> --task translation --arch transformer \
--max-source-positions 1024 --max-target-positions 1024 \
--path <checkpoint> --results-path <out-dir> --gen-subset <train/test/valid> --beam 1
Tool | What it does
dataset.zip | Holds the compiled equations and assembly
tokenized.zip | Holds the tokenized assembly, already prepared with fairseq-preprocess
make.sh | Compiles the open-source programs into ELF and assembly files
collect_dataset.py | Disassembles the ELF functions for REMEND to process
generate.sh | Runs REMEND, generates equations and checks them for correctness
fairseq-generate | Runs a trained model and writes its translations
Example: You compile the open-source programs with make.sh, disassemble them with collect_dataset.py, then run generate.sh. REMEND writes an equation for each function and scores it for correctness, and the results appear in text files under the generated folder, one set per architecture.
For newcomers and experts: Decompiling means turning machine code back into something readable. REMEND focuses on formulas. A first small step is to download the repository and look inside tokenized.zip, which holds assembly already prepared for the model.
The model is a small transformer encoder-decoder, up to 12 million parameters, paired with algorithmic processing for symbolic reasoning. In its tests a single model scored 89.8 to 92.4 percent, covering three CPU instruction sets, three compiler optimization levels and two languages. On code from open-source programs it reports 8 percent higher accuracy than other neural decompilers, at about 0.132 seconds per function.
Compiled function becomes assembly
Assembly is split into tokens
Encoder-decoder transformer writes an equation
Algorithmic processing adds symbolic reasoning
Equation is checked for correctness
To train a model, the card gives one fairseq command, run with different parameters for each model.
fairseq-train <tokenized-dataset> --task translation --arch transformer \
--optimizer adam --weight-decay 0.001 --lr 0.0005 --lr-scheduler inverse_sqrt \
--max-source-positions 1024 --max-target-positions 1024 \
--encoder-attention-heads 8 --decoder-attention-heads 8 --encoder-embed-dim 384 --decoder-embed-dim 128 \
--encoder-ffn-embed-dim 1536 --decoder-ffn-embed-dim 512 --decoder-output-dim 128 --dropout 0.05 \
--max-tokens 20000 --max-update 100000 \
--no-epoch-checkpoints --keep-best-checkpoints 3 \
--save-dir <save-dir> --log-file <save-dir>/training.log
Good to know:
Title: Accuracy range reported across settings
Lowest: 89.8%
Highest: 92.4%
Download its files with Hugging Face's command line:
pip install -U huggingface_hub
hf download udiboy1209/REMEND
Then follow the usage in its model card. Nothing in this kit runs by itself.
README.md 7 KB
Listed Hugging Face models in the same category that share the most tags with this one.
| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
|---|---|---|---|---|---|
| REMEND This page | 0 | 5 | — | mit | |
| NLLB-200 3.3BShares translation | 293,185 | 493 | — | cc-by-nc-4.0 | |
| Sage-A1.5 GGUF (Q4_K_M)Shares code | 636,834 | 84 | 35.5B | apache-2.0 | |
| Sage-A1.5Shares code | 22,224 | 404 | 36B | apache-2.0 | |
| Rostam-S1-4BShares code | 2,751 | 5 | 4.1B | apache-2.0 |
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Qwen · Kit
Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…
ACE-Step · Kit
Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…
AbdomenAtlas · Kit
Detects and outlines tumors in 9 organs on CT scans, trained with the R-Super method that learns from radiology reports. A research model for medical imaging g…
dBenf · Kit
Answers typed questions about satellite image patches from all 12 Sentinel-2 bands, returning a probability for each option without writing text. A Qwen3.5-0.8…
zimmerk4 · Kit
Plays the full game Getting Over It from the bottom to the end with a small trained policy network that learned inside a JAX physics simulator. For reinforceme…