How to use from the
Use from the
llama-cpp-python library
# !pip install llama-cpp-python

from llama_cpp import Llama

llm = Llama.from_pretrained(
	repo_id="librepowerai/TriLM-3.9B-TQ2_0",
	filename="",
)
output = llm(
	"Once upon a time,",
	max_tokens=512,
	echo=True
)
print(output)

TriLM 3.9B β€” TQ2_0 GGUF for IBM Power

TriLM 3.9B (Spectra Suite, ternary {-1, 0, +1} weights) quantized to TQ2_0 (2.06 bits per weight) for fast CPU inference with llama.cpp β€” optimized for IBM POWER9 and later with the LibrePower VSX ternary kernels.

  • File: TriLM-3.9B-TQ2_0.gguf (1.46 GiB, 3.99 B parameters)
  • Quantization: TQ2_0 β€” exact ternary, no quality loss vs the original ternary weights
  • No GPU required.

Run it on IBM Power (ppc64le)

curl -fsSL https://linux.librepower.org/install.sh | sudo sh
sudo apt install librepower-llama

lp-llama-completion -m TriLM-3.9B-TQ2_0.gguf -p "Once upon a time" -n 64 -t 48

Works with any recent llama.cpp on any architecture; the LibrePower build adds VSX acceleration on Power (4.3x prompt / 2.4x generation vs the generic path).

AIX / big-endian

TriLM-3.9B-TQ2_0-be.gguf is the big-endian variant for IBM AIX (dnf install llama-aix from aix.librepower.org):

lp-llama-completion -m TriLM-3.9B-TQ2_0-be.gguf -p "Once upon a time" -n 64 -t 16

Performance (IBM POWER9, Ubuntu 22.04, llama-bench)

Test Threads Tokens/s
Prompt processing (pp64) 96 121.2
Generation (tg64) 48 29.5
Generation (tg64) 24 22.3

Note: this is a base model (no instruction tuning) β€” use completion-style prompts, not chat.

Credits

Downloads last month
4,748
GGUF
Model size
4B params
Architecture
llama
Hardware compatibility
Log In to add your hardware

2-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for librepowerai/TriLM-3.9B-TQ2_0

Quantized
(3)
this model