Coder Social home page Coder Social logo

llm4code-extraction's Introduction

Traces of Memorisation in Large Language Models for Code

Replication package for the paper titled "Traces of Memorisation in Large Language Models for Code"

For questions about the content of this repo, please use the issues board. If you have any questions about the paper, please email the first author.

Requirements

The requirements can be installed using Conda by running:

conda create --name LLMExtract --file requirements.txt

The code is intended to run on an Nvidia A40 with 48GB Vram, 32GB of RAM and 8 CPU cores. Smaller models can be run with lesser hardware as well, but be sure to change the batchsizes in the scripts.

Generation

To run an experiment simply run the following commands. The $model_name should be set to the path of a model on HuggingFace, such as Salesforce/codegen2-1B.

For text models:

python3 generate_text.py $model_name

For code models:

python3 generate.py $model_name

Ethical use

Use the code and concepts shared here ethically. The authors have shared this code to improve the security and safety of LLMs. Do not use this code for malicious purposes. When disclosing data leakage do not needlessly use put the privacy of people at risk.

llm4code-extraction's People

Contributors

aalkaswan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.