Qwen2.5-1.5B-Instruct for Kjarni
This is Qwen's Qwen2.5-1.5B-Instruct, unchanged, hosted so it runs locally with Kjarni: one native library, with no Python runtime, server or cloud service. Qwen2.5-1.5B-Instruct is a 1.5-billion-parameter Qwen 2.5 chat model: still quick on a laptop CPU, and noticeably better than the 0.5B at following instructions. The full-precision weights are about 3.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-1.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-1.5b-instruct # or run kjarni chat -m qwen2.5-1.5b-instruct to talk to it
A hash table is a data structure that implements an associative array abstract data type, allowing for efficient insertion and retrieval of key-value pairs.
Python
# pip install kjarni
from kjarni import Chat
chat = Chat(model="qwen2.5-1.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-1.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-1.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-1.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-1.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.
Complete examples
Runnable projects in kjarni-examples:
- python-local-llm: streaming chat in the terminal, in Python
- python-document-qa: answer questions from your own documents (RAG), in Python
- openai-compatible-server: the OpenAI Python client against
kjarni serve
What changed from the original
Nothing. Every file here is byte for byte the same as in
Qwen/Qwen2.5-1.5B-Instruct at revision 989aa7980e4cf806f80c7fef2b1adb7bc71aa306, except this README,
which replaces Qwen's model card, and qwen2.5-1.5b-instruct-q4_k_m.gguf, Qwen's own 4-bit file from
Qwen/Qwen2.5-1.5B-Instruct-GGUF at revision 91cad51170dc346986eccefdc2dd33a9da36ead9.
About the model
Qwen2.5-1.5B-Instruct is a 1.5-billion-parameter Qwen 2.5 chat model: still quick on a laptop CPU, and noticeably better than the 0.5B at following instructions. 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.