OSCAR
Code for ICML 2021 paper: How could Neural Networks understand Programs?
Install / Use
/learn @pdlan/OSCARREADME
OSCAR
This repository contains the source code of our ICML 2021 paper How could Neural Networks understand Programs?.

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
node-connect
341.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.4kCommit, push, and open a PR
