SkillAgentSearch skills...

OSCAR

Code for ICML 2021 paper: How could Neural Networks understand Programs?

Install / Use

/learn @pdlan/OSCAR
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

OSCAR

This repository contains the source code of our ICML 2021 paper How could Neural Networks understand Programs?. Architecture

Environment

Run following commands to build a docker image for the environment:

cd docker
sudo docker build -t oscar:latest .

And you can launch a container with nvidia-docker command.

sudo nvidia-docker run -it --shm-size=100g --mount type=bind,source="$(pwd)",target=/oscar oscar:latest

To compile the binaries for processing the data:

cd /oscar/bin
make

Then the OSCAR LLVM analyzer pass (located in analyzer), IR Lexer (located in irlexer), and FastBPE (located in fastBPE) will be compiled.

Processing the data

First, please visit https://1drv.ms/f/c/0cb8cc76ec823036/EjYwgux2zLgggAwIBAAAAAAB7290YKG35xKA4FX5_eqvEg?e=b5XdV7 to download the data for pretraining and downstream tasks. Extract the downloaded tarballs to the data-raw directory.

To process the data for pretraining and the downstream tasks, enter the coressponding directories and execute ./process.sh. Raw data needs to be placed in the directory data-raw. Processed data will be placed in the directory data-bin.

Train the model

Use following commands to pretrain the model:

cd /oscar/model
./scripts/pretrain.sh

For downstream tasks the procedure is similar.

Related Skills

View on GitHub
GitHub Stars123
CategoryDevelopment
Updated6mo ago
Forks18

Languages

Python

Security Score

72/100

Audited on Sep 19, 2025

No findings