atlas

Research map / Large language models / Agents, code and math

Lemur: Harmonizing Natural Language and Code for Language Agents

ICLR 2024 · Large language models › Agents, code and math · approach: Long-horizon LLM agents · 6 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces Lemur and Lemur-Chat, Llama-2-70B continually pre-trained on a 10:1 code-to-text corpus (90B tokens) and instruction-tuned on ~300K text and code examples to balance natural language and coding for language agents.

Problem

Open-source LLMs specialize in either natural language or code, but language agents need both to reason, communicate, and execute grounded actions in environments.

Approach

Continually pre-train Llama-2-70B on a code-intensive corpus (about 90% code, mostly scripting languages) mixed with text, then instruction-tune on text and code data, and evaluate balanced capability across text, code, and multi-turn agent benchmarks.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
continue-pre-train Llama-2-70B on code-intensive text-and-code dataLlama-2-70B · Text and code benchmarks (average)average: 43.6 -> 47.9Helped
instruction fine-tune Lemur on text and code instructionsLemur · Text and code benchmarks (average)average: 40.2 -> 55.0Helped
use Lemur-Chat rather than Llama-2-70B-ChatLlama-2-70B-Chat · M-GSM8Ksuccess rate: 33.33 -> 58.33Helped
use Lemur-Chat rather than Llama-2-70B-ChatLlama-2-70B-Chat · M-HumanEvalsuccess rate: 8.89 -> 46.67Helped
add GPT-4 natural-language feedbackLemur-Chat · MINT reasoning and code generationmicro average: 30.31 -> 38.50Helped
map WebArena actions to Python representations instead of directly predicting predefined actionsLemur-Chat · WebArenaperformanceHelped
use Lemur-Chat rather than other open-source modelsopen-source language agents · 13 agent benchmarksperformance: 12 of the 13 agent benchmarksHelped
increase interaction turns to incorporate environment feedbackLemur-Chat · InterCode-SQLsuccess rateHelped

Surprising findings

Limitations

Experimental setup

Datasets: The Stack RefinedWeb RedPajama CommonCrawl Wikipedia Books ArXiv StackExchange DM Mathematics Open Assistant 1 OpenOrca ShareGPT

Benchmarks: MMLU BBH GSM8K HumanEval MBPP Spider MultiPL-E DS-1000 MINT-GSM8K MINT-MATH MINT-TheoremQA MINT-HotpotQA

Metrics: accuracy pass@1 success rate score delta feedback

Baselines: Llama-2-70B Llama-2-70B-Chat Code Llama-34B Code Llama-34B-Instruct StarCoder-15B StarCoderPlus-15B WizardCoder-15B GPT-3.5-turbo GPT-4 text-bison-001

Builds on: Llama 2 The Stack EasyLM MINT InterCode

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy