/lang-unchain

Unchaining langchain - explaining & solving LLM tasks in notebooks with simple & readable code, minimal abstractions, stable dependencies – the opposite of langchain!

MIT LicenseMIT

lang-unchain 🦋

Unchaining langchain - explaining & solving LLM tasks in notebooks with simple & readable code, minimal abstractions, stable dependencies – the opposite of langchain!

About the project

langchain 🦜️🔗 tries to fit any LLM task / model / tool / API in a few lines of code that hide a rabbit-hole of endless abstractions, chains and components. This makes langchain code unstable, practically impossible to read & understand, customize, verify, debug.

lang-unchain 🦋 is the opposite: a curated collection of self-contained jupyter notebooks, each explaining & solving a concrete LLM task in simple & readable python code, minimal abstractions, stable dependencies - so you can easily read & understand, customize, verify, debug.

Notebooks

Each jupyter/colab notebook is self-contained, including everything needed to understand the LLM task it solves, run it and get the printed results: task overview, sources & references, installations & imports, downloading & processing sample data as needed, solving & explaining, analyzing results...

  • work in progress Chat with OpenAI gpt API in a few lines of code by Oz Livneh: explaining & implementing all the basic functionality of langchain ChatOpenAI in less than 100 lines of simple code, including token & budget calculation, retrying, async operations, even OpenAI API features that langchain didn't implement like getting the finish reason.
  • work in progress Embed your docs for semantic search / clustering / RAG by Oz Livneh: explaining about embedding and different models, demonstrating how to embed your docs for semantic search - first with OpenAI embedding API, then with free & open-source local models.
  • work in progress LLM Question answering on your docs by Oz Livneh: explaining & implementing all the stages needed to use an LLM like OpenAI gpt API for question answering on your docs.
  • unassigned Text generation with a recent open-source LLM in colab
  • unassigned Code generation with a recent open-source LLM in colab
  • unassigned Fine-tuning a recent open-source LLM in colab
  • unassigned Fine-tuning with RL on a recent open-source LLM in colab

Discussion & contribution

  • Any contribution is welcome!
  • You're welcome to open an issue for requests, discussing notebooks, bugs, issues etc.
  • If you wish to contribute a notebook - please message me (email / LinkedIn) so we can discuss, add you to contributors (👇) and list the notebook with work in progress until it's ready - so people can make suggestions, offer help etc.
  • You're welcome to discuss lang-unchain or LLMs in general in LLMs IL 🤖 LinkedIn group.

Contributors

  • Oz Livneh - AI Expert & Hands-on Consultant 🤖 Computer Vision | NLP/chatGPT/gpt/LLMs - developing agents, training, reducing costs... | ML/DL/Data Science | Time Series 💪 ex-PhD, 7+ years