Kenchi 1

Code on GitHub ยท Weights on Hugging Face

Kenchi (่ฌ™็Ÿฅ, "humble knowledge") is a small language model I made, with about 500 million parameters. The goal of Kenchi is that it is the smallest model that can use tools and tell you when it does not know.

It is only ~500M parameters so it has many limitations.

Made by Rex Hall (rexmhall09) with Lor, using Fable 5.2, Astra 6.2, and Fern 0.1. Code and weights are MIT.

Use

The easiest way to run it is with the code at github.com/rexmhall09/kenchi, which has a terminal chat that searches Wikipedia.

With transformers>=4.44.2 (install torch, transformers>=4.44.2, sentencepiece and safetensors):

from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("rexmhall09/kenchi", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("rexmhall09/kenchi", trust_remote_code=True)
reply = model.chat(tok, [{"role": "user", "content": "Who are you?"}])
print(reply["content"])

chat() returns an OpenAI-style assistant message. Pass tools (OpenAI-style function schemas) to let it call tools. When the reply has tool_calls, run the tool, add the result as a tool message, and call chat() again.

Limitations

  • It can be wrong, and wrong answers still come with a source. Open the link.
  • Follow-up questions ("where was he born?") mostly fail. Ask the full question again.
  • It is not a good general chatbot.
  • English only.
  • 2,048 tokens of context.

Data

Built with Qwen: some of the training data was written by Qwen models. The search results used in training are Wikipedia text (CC BY-SA 3.0). DATA.md has the full sources and citations.

Downloads last month
31
Safetensors
Model size
0.5B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support