Mozilla / TriLM-llamafile

huggingface.co
Total runs: 132
24-hour runs: 0
7-day runs: -1
30-day runs: -8
Model's Last Updated: August 27 2024
text-generation

Introduction of TriLM-llamafile

Model Details of TriLM-llamafile

TriLM - llamafile

This is a ternary LLM whose weights consist of {-1, 0, +1}. It's highly optimized for CPU performance, thanks to the Q2_K_S quantization format .

This repository packages and distributes TriLM as executable weights, which we call llamafiles . The files you download here will run on Linux, MacOS, Windows, FreeBSD, OpenBSD, and NetBSD for AMD64 and ARM64.

Quickstart

Running the following on a desktop OS will launch a tab in your web browser with a completions interface.

wget https://huggingface.co/Mozilla/TriLM-llamafile/resolve/main/TriLM_3.9B.llamafile
chmod +x TriLM_3.9B.llamafile
./TriLM_3.9B.llamafile

You can also use the command line interface:

./TriLM_3.9B.llamafile -p "this is my prompt"

For further information, please see the llamafile README .

Having trouble? See the "Gotchas" section of the README.

Prompting

This is a base model. It hasn't been fine-tuned for chat. It's recommended that the completions interface be used.

It's recommended with the smaller TriLM models (e.g. 99M) that a high repeat penalty be set, e.g. --repeat-penalty 10 . When using the CLI mode, this flag is specified by default in the .args file embedded within the llamafiles from this repo.

Benchmarks
cpu_info model_filename size test t/s
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_3.9B.llamafile 1.31 GiB pp512 1069.54
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_3.9B.llamafile 1.31 GiB tg16 88.47
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_2.4B.llamafile 837.02 MiB pp512 1441.04
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_2.4B.llamafile 837.02 MiB tg16 110.80
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_1.5B.llamafile 531.44 MiB pp512 2185.94
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_1.5B.llamafile 531.44 MiB tg16 154.59
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_1.1B.llamafile 408.66 MiB pp512 2692.87
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_1.1B.llamafile 408.66 MiB tg16 173.08
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_830M.llamafile 301.76 MiB pp512 3353.51
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_830M.llamafile 301.76 MiB tg16 191.98
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_560M.llamafile 211.21 MiB pp512 4297.08
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_560M.llamafile 211.21 MiB tg16 209.57
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_390M.llamafile 148.93 MiB pp512 5130.90
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_390M.llamafile 148.93 MiB tg16 221.88
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_99M.llamafile 148.93 MiB pp512 5127.00
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_99M.llamafile 148.93 MiB tg16 218.93
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_190M.llamafile 78.55 MiB pp512 10874.11
AMD Ryzen Threadripper PRO 7995WX (znver4) TriLM_190M.llamafile 78.55 MiB tg16 334.45
Apple M2 Ultra (+fp16+dotprod) TriLM_3.9B.llamafile 1.31 GiB pp512 227.95
Apple M2 Ultra (+fp16+dotprod) TriLM_3.9B.llamafile 1.31 GiB tg16 65.17
Apple M2 Ultra (+fp16+dotprod) TriLM_2.4B.llamafile 837.02 MiB pp512 347.93
Apple M2 Ultra (+fp16+dotprod) TriLM_2.4B.llamafile 837.02 MiB tg16 48.26
Apple M2 Ultra (+fp16+dotprod) TriLM_1.5B.llamafile 531.44 MiB pp512 588.86
Apple M2 Ultra (+fp16+dotprod) TriLM_1.5B.llamafile 531.44 MiB tg16 140.22
Apple M2 Ultra (+fp16+dotprod) TriLM_1.1B.llamafile 408.66 MiB pp512 767.47
Apple M2 Ultra (+fp16+dotprod) TriLM_1.1B.llamafile 408.66 MiB tg16 167.80
Apple M2 Ultra (+fp16+dotprod) TriLM_830M.llamafile 301.76 MiB pp512 1031.20
Apple M2 Ultra (+fp16+dotprod) TriLM_830M.llamafile 301.76 MiB tg16 204.46
Apple M2 Ultra (+fp16+dotprod) TriLM_560M.llamafile 211.21 MiB pp512 1487.29
Apple M2 Ultra (+fp16+dotprod) TriLM_560M.llamafile 211.21 MiB tg16 245.53
Apple M2 Ultra (+fp16+dotprod) TriLM_390M.llamafile 148.93 MiB pp512 2049.02
Apple M2 Ultra (+fp16+dotprod) TriLM_390M.llamafile 148.93 MiB tg16 332.24
Apple M2 Ultra (+fp16+dotprod) TriLM_99M.llamafile 148.93 MiB pp512 2103.34
Apple M2 Ultra (+fp16+dotprod) TriLM_99M.llamafile 148.93 MiB tg16 301.31
Apple M2 Ultra (+fp16+dotprod) TriLM_190M.llamafile 78.55 MiB pp512 4762.49
Apple M2 Ultra (+fp16+dotprod) TriLM_190M.llamafile 78.55 MiB tg16 553.83
Intel Core i9-14900K (alderlake) TriLM_3.9B.llamafile 1.31 GiB pp512 167.15
Intel Core i9-14900K (alderlake) TriLM_3.9B.llamafile 1.31 GiB tg16 53.22
Intel Core i9-14900K (alderlake) TriLM_2.4B.llamafile 837.02 MiB pp512 261.73
Intel Core i9-14900K (alderlake) TriLM_2.4B.llamafile 837.02 MiB tg16 78.39
Intel Core i9-14900K (alderlake) TriLM_1.5B.llamafile 531.44 MiB pp512 426.17
Intel Core i9-14900K (alderlake) TriLM_1.5B.llamafile 531.44 MiB tg16 123.91
Intel Core i9-14900K (alderlake) TriLM_1.1B.llamafile 408.66 MiB pp512 563.58
Intel Core i9-14900K (alderlake) TriLM_1.1B.llamafile 408.66 MiB tg16 159.13
Intel Core i9-14900K (alderlake) TriLM_830M.llamafile 301.76 MiB pp512 763.27
Intel Core i9-14900K (alderlake) TriLM_830M.llamafile 301.76 MiB tg16 209.42
Intel Core i9-14900K (alderlake) TriLM_560M.llamafile 211.21 MiB pp512 1116.30
Intel Core i9-14900K (alderlake) TriLM_560M.llamafile 211.21 MiB tg16 295.71
Intel Core i9-14900K (alderlake) TriLM_390M.llamafile 148.93 MiB pp512 1586.69
Intel Core i9-14900K (alderlake) TriLM_390M.llamafile 148.93 MiB tg16 377.50
Intel Core i9-14900K (alderlake) TriLM_99M.llamafile 148.93 MiB pp512 1587.38
Intel Core i9-14900K (alderlake) TriLM_99M.llamafile 148.93 MiB tg16 401.37
Intel Core i9-14900K (alderlake) TriLM_190M.llamafile 78.55 MiB pp512 3713.16
Intel Core i9-14900K (alderlake) TriLM_190M.llamafile 78.55 MiB tg16 845.54
Raspberry Pi 5 Model B Rev 1.0 (+fp16+dotprod) TriLM_3.9B.llamafile 1.31 GiB pp512 17.02
Raspberry Pi 5 Model B Rev 1.0 (+fp16+dotprod) TriLM_3.9B.llamafile 1.31 GiB tg16 6.67
Raspberry Pi 5 Model B Rev 1.0 (+fp16+dotprod) TriLM_2.4B.llamafile 837.02 MiB pp512 26.35
Raspberry Pi 5 Model B Rev 1.0 (+fp16+dotprod) TriLM_2.4B.llamafile 837.02 MiB tg16 10.52
Raspberry Pi 5 Model B Rev 1.0 (+fp16+dotprod) TriLM_1.5B.llamafile 531.44 MiB pp512 42.52
Raspberry Pi 5 Model B Rev 1.0 (+fp16+dotprod) TriLM_1.5B.llamafile 531.44 MiB tg16 16.91
Raspberry Pi 5 Model B Rev 1.0 (+fp16+dotprod) TriLM_1.1B.llamafile 408.66 MiB pp512 56.57
Raspberry Pi 5 Model B Rev 1.0 (+fp16+dotprod) TriLM_1.1B.llamafile 408.66 MiB tg16 20.54
Raspberry Pi 5 Model B Rev 1.0 (+fp16+dotprod) TriLM_390M.llamafile 148.93 MiB pp512 146.67
Raspberry Pi 5 Model B Rev 1.0 (+fp16+dotprod) TriLM_390M.llamafile 148.93 MiB tg16 56.77
Raspberry Pi 5 Model B Rev 1.0 (+fp16+dotprod) TriLM_99M.llamafile 148.93 MiB pp512 147.65
Raspberry Pi 5 Model B Rev 1.0 (+fp16+dotprod) TriLM_99M.llamafile 148.93 MiB tg16 58.24
Raspberry Pi 5 Model B Rev 1.0 (+fp16+dotprod) TriLM_190M.llamafile 78.55 MiB pp512 338.42
Raspberry Pi 5 Model B Rev 1.0 (+fp16+dotprod) TriLM_190M.llamafile 78.55 MiB tg16 107.33
About llamafile

llamafile is a new format introduced by Mozilla Ocho on Nov 20th 2023. It uses Cosmopolitan Libc to turn LLM weights into runnable llama.cpp binaries that run on the stock installs of six OSes for both ARM64 and AMD64.


TriLM 3.9B Unpacked

TriLM (ternary model), unpacked to FP16 format - compatible with FP16 GEMMs. After unpacking, TriLM has the same architecture as LLaMa.

import transformers as tf, torch
model_name = "SpectraSuite/TriLM_3.9B_Unpacked"

# Please adjust the temperature, repetition penalty, top_k, top_p and other sampling parameters according to your needs.
pipeline = tf.pipeline("text-generation", model=model_id, model_kwargs={"torch_dtype": torch.float16}, device_map="auto")

# These are base (pretrained) LLMs that are not instruction and chat tuned. You may need to adjust your prompt accordingly.
pipeline("Once upon a time")

Runs of Mozilla TriLM-llamafile on huggingface.co

132
Total runs
0
24-hour runs
1
3-day runs
-1
7-day runs
-8
30-day runs

More Information About TriLM-llamafile huggingface.co Model

More TriLM-llamafile license Visit here:

https://choosealicense.com/licenses/apache-2.0

TriLM-llamafile huggingface.co

TriLM-llamafile huggingface.co is an AI model on huggingface.co that provides TriLM-llamafile's model effect (), which can be used instantly with this Mozilla TriLM-llamafile model. huggingface.co supports a free trial of the TriLM-llamafile model, and also provides paid use of the TriLM-llamafile. Support call TriLM-llamafile model through api, including Node.js, Python, http.

TriLM-llamafile huggingface.co Url

https://huggingface.co/Mozilla/TriLM-llamafile

Mozilla TriLM-llamafile online free

TriLM-llamafile huggingface.co is an online trial and call api platform, which integrates TriLM-llamafile's modeling effects, including api services, and provides a free online trial of TriLM-llamafile, you can try TriLM-llamafile online for free by clicking the link below.

Mozilla TriLM-llamafile online free url in huggingface.co:

https://huggingface.co/Mozilla/TriLM-llamafile

TriLM-llamafile install

TriLM-llamafile is an open source model from GitHub that offers a free installation service, and any user can find TriLM-llamafile on GitHub to install. At the same time, huggingface.co provides the effect of TriLM-llamafile install, users can directly use TriLM-llamafile installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

TriLM-llamafile install url in huggingface.co:

https://huggingface.co/Mozilla/TriLM-llamafile

Url of TriLM-llamafile

TriLM-llamafile huggingface.co Url

Provider of TriLM-llamafile huggingface.co

Mozilla
ORGANIZATIONS

Other API from Mozilla

huggingface.co

Total runs: 2.8K
Run Growth: 905
Growth Rate: 32.30%
Updated:October 02 2024
huggingface.co

Total runs: 374
Run Growth: 144
Growth Rate: 38.50%
Updated:November 25 2024
huggingface.co

Total runs: 41
Run Growth: 7
Growth Rate: 17.07%
Updated:August 20 2025
huggingface.co

Total runs: 14
Run Growth: -8
Growth Rate: -57.14%
Updated:May 05 2024
huggingface.co

Total runs: 4
Run Growth: 4
Growth Rate: 100.00%
Updated:October 16 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:March 04 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:April 04 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 15 2025