Kani: A Lightweight and Highly Hackable Framework for Building Language Model Applications

Andrew Zhu, Liam Dugan, Alyssa Hwang, Chris Callison-Burch
9/11/2023
cs.SEcs.AIcs.CL

No official code found. Best implementation: zhudotexe/kani (610 stars, MIT, last commit 2026-03-17).

Abstract

Language model applications are becoming increasingly popular and complex, often including features like tool usage and retrieval augmentation. However, existing frameworks for such applications are often opinionated, deciding for developers how their prompts ought to be formatted and imposing limitations on customizability and reproducibility. To solve this we present Kani: a lightweight, flexible, and model-agnostic open-source framework for building language model applications. Kani helps developers implement a variety of complex features by supporting the core building blocks of chat interaction: model interfacing, chat management, and robust function calling. All Kani core functions are easily overridable and well documented to empower developers to customize functionality for their own needs. Kani thus serves as a useful tool for researchers, hobbyists, and industry professionals alike to accelerate their development while retaining interoperability and fine-grained control.

View on arXivView PDF

Code Implementations(1)

zhudotexe/kaniCommunity100%
MIT

kani (カニ) is a highly hackable microframework for tool-calling language models. (NLP-OSS @ EMNLP 2023)

61031Shell, PythonJul 14, 20237 months agoMIT
chatgptframeworkfunction-callinggpt-4large-language-models+5 more

Similar Papers

Cite this paper

@article{zhu2023kani,
  title  = {Kani: A Lightweight and Highly Hackable Framework for Building Language Model Applications},
  author = {Andrew Zhu and Liam Dugan and Alyssa Hwang and Chris Callison-Burch},
  year   = {2023},
  eprint = {2309.05542},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.05542v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2309.05542.svg)](https://codeofpaper.com/paper/2309.05542)

Discussion