Coder Social home page Coder Social logo

ai_planning_searching's Introduction

ai_planning_searching

"On Decoding", or, how to learn the model $ \log p(y | x ) = \sum_{j=0}^{m-1} \log p(y_{j+1} | y_{\le_{j}}, x)$ and estimate $y^{} = \arg\max_{y} p(y|x)$, using a transformer architecture. (Note that the sum is over terms of the form $\log p(y_{j+1} | y_{\le_{j}}, x)$ as this is the meaning of being autoregressive--to generative the locally next token, we condition on all previously generated tokens.) \ This estimation is exponential in the length of the decoded string $y$. (To be precise it is $y^{|V|}$ where $V$ is the vocabulary size).\ The following methods reduce the search space of large language model inference while approximating the optimal $y^{}$.\

ai_planning_searching's People

Contributors

annh3 avatar

Watchers

 avatar

ai_planning_searching's Issues

fix test_expand

  1. Code is getting unreadable. Create a Beam_Item class to keep track of candidate beams, in particular with a field beam_tokens to keep track of the tokens as a single Tensor (1, seq_len_so_far)

AND

  1. After each call to logits_to_token_strings, make sure beam_tokens is updated with the newly generated token

[p0] Set attention mask and pad token in beam generate

The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's attention_mask to obtain reliable results.
Setting pad_token_id to eos_token_id:50256 for open-end generation.

fix backpropagate_statistics

line 252 in backpropagate_statistics needs to update P_UCB_s_a

In particular, what is the representation of P_s_a we are storing and does it accord with the MCTS algorithm as intended?

[p0] apps_dataset playground

  1. Make a jupyter notebook for playing with the APPS dataset
  2. Write a function (call it verify_exec_smoothness) to sample questions from the dataset (q_statement), sample a ground truth solution (sol_gt), sample from the input space of each question (q_input), feed the sampled input (q_input) to the sampled ground truth (sol_gt) using the exec function, (currently the notebook requires keyboard input... if this is too difficult, then try running it as a python script). This function should verify that the test dataset is executable using exec() [or some modification of it] almost everywhere in the dataset

refactor select function

Currently the select function does not do what it says in the docstring, i.e. "traverse to the tree to find a node that has not been previously expanded (a node without children nodes)."

Instead it contains too many other functions folded in, such as calling expand.

Then, after this refactor, rewrite test_select.

[p2] try some form of parallelization

Monte Carlo tree search can be concurrently executed by many threads or processes. There are several fundamentally different methods of its parallel execution:[52]

Leaf parallelization, i.e. parallel execution of many playouts from one leaf of the game tree.
Root parallelization, i.e. building independent game trees in parallel and making the move basing on the root-level branches of all these trees.
Tree parallelization, i.e. parallel building of the same game tree, protecting data from simultaneous writes either with one, global mutex, with more mutexes, or with non-blocking synchronization.[53]

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.