A Library and Tutorial for Factored Cognition with Language Models
post by stuhlmueller, justin_dan, goodgravy · 2022-09-28T18:15:10.800Z · LW · GW · 0 commentsContents
Interactive Composition Explorer (ICE) Factored Cognition Primer None No comments
We want to advance process-based supervision for language models [LW · GW]. To make it easier for others to contribute to that goal, we're sharing code for writing compositional language model programs, and a tutorial that explains how to get started:
- The Interactive Composition Explorer (ICE) is a library for writing and debugging compositional language model programs.
- The Factored Cognition Primer is a tutorial that explains using examples how to write such programs.
We've been using ICE as part of our work on Elicit and have found it useful in practice.
Interactive Composition Explorer (ICE)
ICE is an open-source Python library for writing, debugging, and visualizing compositional language model programs. ICE makes it easy to:
- Run language model recipes in different modes: humans, human+LM, LM
- Inspect the execution traces in your browser for debugging
- Define and use new language model agents, e.g. chain-of-thought agents
- Run recipes quickly by parallelizing language model calls
- Reuse component recipes such as question-answering, ranking, and verification
ICE looks like this:
Factored Cognition Primer
The Factored Cognition Primer is a tutorial that explains (among other things) how to:
- Implement basic versions of amplification and debate using ICE
- Reason about long texts by combining search and generation
- Run decompositions quickly by parallelizing language model calls
- Use verification of answers and reasoning steps to improve responses
The Primer looks like this:
If you end up using either, consider joining our Slack. We think that factored cognition research parallelizes unusually well and would like to collaborate with others who are working on recipes for cognitive tasks.
To learn more about how we've been using ICE, watch our recent Factored Cognition lab meeting.
0 comments
Comments sorted by top scores.