Qwen2.5-0.5B-Instruct for Kjarni
This is Qwen's Qwen2.5-0.5B-Instruct, unchanged, hosted so it runs locally with Kjarni: one native library, with no Python runtime, server or cloud service. Qwen2.5-0.5B-Instruct is the smallest Qwen 2.5 chat model, about half a billion parameters: fast on any CPU, and good for short answers, classification and structured output rather than long reasoning. The full-precision weights are about 1 GB, and the 4-bit GGUF beside them a fraction of that; each downloads on first use.
Usage
In Kjarni the model is called qwen2.5-0.5b-instruct. The reply below is an example: replies are sampled,
so yours will be worded differently.
Command line
curl -fsSL https://kjarni.ai/install.sh | sh # Windows: irm https://kjarni.ai/install.ps1 | iex
echo "In one sentence, what is a hash table?" | kjarni chat -q -m qwen2.5-0.5b-instruct # or run kjarni chat -m qwen2.5-0.5b-instruct to talk to it
A hash table stores data using a hash function to determine the index in an array for each element.
Python
# pip install kjarni
from kjarni import Chat
chat = Chat(model="qwen2.5-0.5b-instruct", quiet=True)
print(chat.send("In one sentence, what is a hash table?"))
Rust
// cargo add kjarni anyhow tokio --features tokio/full
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let reply = kjarni::chat::send("qwen2.5-0.5b-instruct", "In one sentence, what is a hash table?").await?;
println!("{reply}");
Ok(())
}
C#
// dotnet add package Kjarni
using Kjarni;
using var chat = new Chat("qwen2.5-0.5b-instruct", quiet: true);
Console.WriteLine(chat.Send("In one sentence, what is a hash table?"));
C++ (C++23)
#include <kjarni.hpp>
#include <iostream>
int main() {
kjarni::ChatOptions options;
options.model = "qwen2.5-0.5b-instruct";
auto chat = kjarni::Chat::create(options);
if (!chat) return 1;
auto reply = chat->send("In one sentence, what is a hash table?");
if (!reply) return 1;
std::cout << *reply << "\n";
}
Go
// go get github.com/kjarni-ai/kjarni-go
package main
import (
"fmt"
"log"
kjarni "github.com/kjarni-ai/kjarni-go"
)
func main() {
chat, err := kjarni.NewChat("qwen2.5-0.5b-instruct", kjarni.WithQuiet(true))
if err != nil {
log.Fatal(err)
}
defer chat.Close()
reply, err := chat.Send("In one sentence, what is a hash table?")
if err != nil {
log.Fatal(err)
}
fmt.Println(reply)
}
To run on a GPU, add --gpu on the command line or pass device="gpu". For the 4-bit
weights, which use a fraction of the memory and generate faster on a CPU, add --gguf or
pass quantized=True. See the Kjarni documentation for installation
details.
What changed from the original
Nothing. Every file here is byte for byte the same as in
Qwen/Qwen2.5-0.5B-Instruct at revision 7ae557604adf67be50417f59c2c2f167def9a775, except this README,
which replaces Qwen's model card, and qwen2.5-0.5b-instruct-q4_k_m.gguf, Qwen's own 4-bit file from
Qwen/Qwen2.5-0.5B-Instruct-GGUF at revision 9217f5db79a29953eb74d5343926648285ec7e67.
About the model
Qwen2.5-0.5B-Instruct is the smallest Qwen 2.5 chat model, about half a billion parameters: fast on any CPU, and good for short answers, classification and structured output rather than long reasoning. Qwen2.5 Instruct models follow instructions, write structured output such as JSON, and read up to 32,768 tokens, in more than 29 languages. Released by the Qwen team at Alibaba in September 2024 under the Apache 2.0 license.
See Qwen's model card for training data, benchmarks and intended use.
License
Apache License 2.0, as the original; the license is in LICENSE. Kjarni and this
hosting are not affiliated with or endorsed by Alibaba or the Qwen team.