GithubHelp home page GithubHelp logo

llmicl's Introduction

LLMICL

noisy_logistic_snapshots

Overview

This repository contains official implementation of the paper:

LLMs learn governing principles of dynamical systems, revealing an in-context neural scaling law

It contains code and data necessary to reproduce the experiments and generate the figures presented in the paper. Some of our data processing routine is adapted from llmtime.

Directory structure

An overview of the repository's structure and contents:

  • /data: Contains functions for converting time series data into string formats suitable for processing, alongside series_generator.ipynb, a Jupyter notebook for generating the dynamical system series explored in the paper.
  • /generated_series: This directory holds all the dynamical time series data generated by the series_generator.ipynb.
  • /models: Includes loaders for both the LLaMA and GPT models. It features ICL.py, which outlines essential packages like Hierarchy-PDF and its auxiliary functions. Additionally, generate_predictions.py is provided for applying the selected Large Language Model (LLM) to input time series and saving the outcomes using Hierarchy-PDF.
  • /processed_series: A storage point for the predictions made by the LLM on each time series.
  • /figure_analysis: Comprises routines for evaluating the LLM predictions found in the /processed_series directory, including the computation of metrics such as loss curves. It enables the reproduction of all figures presented in the paper.
  • /figures: A repository for all figures generated through the analysis processes.

Usage guidelines

Follow these steps to utilize the repository for generating dynamical system series, processing them with LLMs, and analyzing the results:

  1. Series Generation:

    • Navigate to the /data directory and open series_generator.ipynb.
    • Define prediction tasks within this notebook, specifying one trajectory to predict per task, along with configurations for the chosen LLM and Hierarchy-PDF.
    • Execute the notebook to generate task files, and save these in the /generated_series directory as pickle files.
  2. Prediction Processing:

    • Use generate_predictions.py found in the /models directory to process the generated series through the LLM, applying Hierarchy-PDF for prediction.
    • Save the processed task files, now containing LLM predictions, in the /processed_series directory as pickle files.
  3. Analysis and Figure Generation:

    • With predictions stored in /processed_series, employ the routines within /figure_analysis to examine the transition rules extracted by the LLM.
    • Generate and review plots to visualize the analysis, replicating the figures from the paper.

Authors

llmicl's People

Contributors

antonioliu97 avatar cbonneville45 avatar

Stargazers

 avatar Wes Gurnee avatar  avatar Oussama Zekri avatar  avatar Nicolas Boulle avatar

Watchers

Chris Earls avatar Nicolas Boulle avatar  avatar

Forkers

ozekri

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.