Update README.md

This commit is contained in:
Zachary Huang 2025-02-05 19:59:03 -05:00 committed by GitHub
parent 73dd62135b
commit 0320581a23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 0 deletions

View File

@ -75,6 +75,18 @@ The ideal framework for LLMs should (1) **strip away low-level implementation de
Pocket Flow is also a *learning resource*, as current frameworks abstract too much away. Pocket Flow is also a *learning resource*, as current frameworks abstract too much away.
| Framework | Computation Models | Communication Models | App-Specific Models | Vendor-Specific Models | LOC | Package + Dependency Size |
|:--------------:|:-----------------------:|:------------------------:|:-----------------------------------------------------:|:---------------------------------------------------------:|:------------------------:|:---------------------------:|
| LangChain | Agent, Chain | Message | Many (e.g., QA, Summarization, etc.) | Many (e.g., OpenAI, Pinecone, etc.) | *405K* | *+166MB* |
| LlamaIndex | Agent, Graph | Message, Shared | Native for RAG (e.g., Summarization, KG Indexing, etc.) | Many [Optional] (e.g., OpenAI, Pinecone, etc.) | *77K (core-only)* | *+189MB (core-only)* |
| CrewAI | Agent, Chain | Message, Shared | Many (e.g., FileReadTool, SerperDevTool, etc.) | Many (e.g., OpenAI, Anthropic, Pinecone, etc.) | *18K* | *+173MB* |
| Haystack | Agent, Graph | Message, Shared | Many (e.g., QA, Summarization, etc.) | Many (e.g., OpenAI, Anthropic, Pinecone, etc.) | *31K* | *+195MB* |
| SmolAgent | Agent | Message | Some (e.g., CodeAgent, VisitWebpageTool, etc.) | Some (e.g., DuckDuckGo, Hugging Face, etc.) | *8K* | *+198MB* |
| LangGraph | Agent, Graph | Message, Shared | Some (e.g., Semantic Search, etc.) | Some (e.g., PostgresStore, SqliteSaver, etc.) | *37K* | *+51MB* |
| AutoGen | Agent | Message | Some (e.g., Tool Agent, Chat Agent, etc.) | Many [Optional] (e.g., OpenAI, Pinecone, etc.) | *7K (core-only)* | *+26MB (core-only)* |
| **PocketFlow** | **Graph** | **Shared** | **None** | **None** | **100** | **+56KB** |
## How Does it Work? ## How Does it Work?
The [100 lines](pocketflow/__init__.py) capture what we see as the core abstraction of most LLM frameworks: a **Nested Directed Graph** that breaks down tasks into multiple (LLM) steps, with branching and recursion for agent-like decision-making. From there, its easy to layer on more complex features. The [100 lines](pocketflow/__init__.py) capture what we see as the core abstraction of most LLM frameworks: a **Nested Directed Graph** that breaks down tasks into multiple (LLM) steps, with branching and recursion for agent-like decision-making. From there, its easy to layer on more complex features.