SBTB23: Omar Khattab, DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelines

  Рет қаралды 5,952

FunctionalTV

FunctionalTV

Күн бұрын

The ML community is rapidly exploring techniques for prompting language models (LMs) and for stacking them into pipelines that solve complex tasks. Unfortunately, existing LM pipelines are typically implemented using hard-coded "prompt templates", i.e. lengthy strings discovered via trial and error. Toward a more systematic approach for developing and optimizing LM pipelines, we introduce DSPy, a programming model that abstracts LM pipelines as text transformation graphs, i.e. imperative computational graphs where LMs are invoked through declarative modules. DSPy modules are parameterized, meaning they can learn (by creating and collecting demonstrations) how to apply compositions of prompting, finetuning, augmentation, and reasoning techniques. We design a compiler that will optimize any DSPy pipeline to maximize a given metric. We conduct two case studies, showing that succinct DSPy programs can express and optimize sophisticated LM pipelines that reason about math word problems, tackle multi-hop retrieval, answer complex questions, and control agent loops. Within minutes of compiling, a few lines of DSPy allow GPT-3.5 and llama2-13b-chat to self-bootstrap pipelines that outperform standard few-shot prompting and pipelines with expert-created demonstrations. On top of that, DSPy programs compiled to open and relatively small LMs like 770M-parameter T5 and llama2-13b-chat are competitive with approaches that rely on expert-written prompt chains for proprietary GPT-3.5. DSPy is available as open source at github.com/stanfordnlp/dspy.
More details available here: www.scale.bythebay.io/post/om...

Пікірлер: 10
@beedr.metwallykhattab115
@beedr.metwallykhattab115 2 ай бұрын
Very good Omar Khattab يحفظكم الله ويرعاكم ويبارك فيكم
@420_gunna
@420_gunna 7 ай бұрын
dank
@vbywrde
@vbywrde 5 ай бұрын
Great! Thank you!
@julianrosenberger1793
@julianrosenberger1793 6 ай бұрын
🙏
@pensiveintrovert4318
@pensiveintrovert4318 2 ай бұрын
The whole point of LLMs is the ability to interact with them in natural language, directly. If that is gone, then FMs should be built around automation and NOT using English.
@sathishgangichetty685
@sathishgangichetty685 Ай бұрын
you are still interacting (as an end user) via natural language. This is showing how to best make sota prompting techniques available to masses without them having to learn them.
@campbellhutcheson5162
@campbellhutcheson5162 5 ай бұрын
I've met a lot of people skeptical of DSPy and these kinds of videos do nothing to dispel the skepticism. I'm 10 minutes in and we haven't seen any examples of how this is any different from ordinary prompting with an LLM. The "goal" that he describes is literally just the prompt without explicit CoT language and CoT language will probably be unnecessary with stronger models, which will better infer when they need to do CoT to reach a good result (excluding cases where output is coerced in JSON mode, etc...).
@campbellhutcheson5162
@campbellhutcheson5162 5 ай бұрын
I literally paused at 16:44 to read the produced prompt. It's fine. But, you literally had to do all the work to get there. And, I'm not sure that's substantially less than writing the prompt yourself, especially when you are going to get GPT-4 to write the first version of the prompt for you (remember turbo-preview knows what LLM prompts are).
@GURUPRASADIYERV
@GURUPRASADIYERV 5 ай бұрын
The magic is in the compiling engine underneath. The optimization will get better with open source contribution.
@thannon72
@thannon72 3 күн бұрын
Another rubbish presentation on DSPy. Do these people really understand it. Just a regurgitation of the documents
NEW TextGrad by Stanford: Better than DSPy
41:25
code_your_own_AI
Рет қаралды 10 М.
EVOLUTION OF ICE CREAM 😱 #shorts
00:11
Savage Vlogs
Рет қаралды 10 МЛН
Каха заблудился в горах
00:57
К-Media
Рет қаралды 9 МЛН
НЫСАНА КОНЦЕРТ 2024
2:26:34
Нысана театры
Рет қаралды 1,4 МЛН
Neural Notes: ColBERT & ColBERTv2
31:09
Vertex Ventures US
Рет қаралды 2,8 М.
LlamaIndex Webinar: Learn about DSPy
57:16
LlamaIndex
Рет қаралды 6 М.
DSPy - Does It Live Up To The Hype?
16:30
Data Science In Everyday Life
Рет қаралды 5 М.
Optimization of LLM Systems with DSPy and LangChain/LangSmith
57:55
Adding Depth to DSPy Programs
1:08:24
Connor Shorten
Рет қаралды 7 М.
Утро начинается не с кофе
0:41
Онлайн-кинотеатр PREMIER
Рет қаралды 7 МЛН
The mother gave birth to a capsule baby ➡️#nico #dog #funny #smartnico #cute
0:33
Smart Sigma Kid #funny #sigma #comedy
0:40
CRAZY GREAPA
Рет қаралды 31 МЛН
Слепой узнал о измене своей жены😳
1:00
🤣🤣🤣
0:29
Dragon Нургелды 🐉
Рет қаралды 2,7 МЛН
Кто из девушек быстрее печатает?
0:58