Kindi

by Amir Husain · Runtime · Text & code

An inference engine that runs ternary-weight language models on older Nvidia Pascal graphics cards, in Docker or Python, across one or several GPUs.

promising

Roughly doubles writing speed on old P100 cards, but reads long prompts slower

Latest · Nov 13Version 0.4 runs Ternary Bonsai 2 27B on old Nvidia cards via Python plus its own GPU code on CUDA 10.2

Write-upFree speed-ups for old GPUs, up to twice the tokens per second

Why we say so

Amir Husain claims 1.9 to 2.7 times llama.cpp's writing speed and 12-14% faster prompt reading. Junk GPU Lab, the only one to have tested it, confirmed the writing gain on one PCIe P100 (31.9 vs 16.5 tok/s, still about 22-25 vs 13.5 at 30K) and matched llama.cpp's output token for token on 4 of 4 prompts. The same tester found prompt reading slower (about 80 vs 125 tok/s) and llama.cpp finishing first on 8K-prompt, short-answer jobs, so the maker's reading claim did not hold on that card. The first start took over 7 minutes.

Seen running on

MachineSpeedHowSeen by
8 runs on 16 GB: 21.8–31.9 tok/s
Tesla P100no speed givenJunk GPU Lab · Nov 13
Tesla P10031.9 tok/s
80 prompt
27B · 36.9K contextJunk GPU Lab · Nov 13
Tesla P100no speed givenJunk GPU Lab · Nov 13
Tesla P100no speed givenJunk GPU Lab · Nov 13
Tesla P100no speed givenJunk GPU Lab · Nov 13
Tesla P100no speed givenJunk GPU Lab · Nov 13
Tesla P10021.8 tok/s
96 prompt
27B · 36.9K contextJunk GPU Lab · Nov 13
Tesla P10030.3 tok/s
110 prompt
27B · 36.9K contextJunk GPU Lab · Nov 13

Evidence

  1. Nov 13
    Claims Ternary Bonsai 2 27B writes 1.9 to 2.7 times as fast as llama.cpp on P100; one PCIe card 29.6 vs 14.4 tok/s
    Maker's claimAmir HusainviaJunk GPU Lab
  2. Nov 13
    Docs claim prompt reading is 12-14% faster than llama.cpp, measured on a P100 SXM2 at 300 W
    Maker's claimAmir HusainviaJunk GPU Lab
  3. Nov 13
    Reports 40.4 tok/s on two P100s on Bonsai versus about 15 for llama.cpp; not tested by the reviewer
    Maker's claimAmir HusainviaJunk GPU Lab
  4. Nov 13
    Writes about twice as fast as stock llama.cpp on one PCIe P100: 31.9 vs 16.5 tok/s, 30.3 vs 15.5 at 8K, about 22-25 vs 13.5 at 30K
    Hands-on testJunk GPU Lab
  5. Nov 13
    Reads prompts slower than stock llama.cpp on a 175 W-capped PCIe P100: about 80 vs 125 tok/s short, 110 vs 134 at 8K
    Hands-on testJunk GPU Lab
Show all 11
  1. Nov 13
    For an 8K-token prompt with a short answer, stock llama.cpp finished first all three times (about 68-82 s vs 80-93 s)
    Hands-on testJunk GPU Lab
  2. Nov 13
    Self-check matched llama.cpp token for token on 4 of 4 prompts; first start took 7 min 21 s loading weights, later starts said to take about 30 s
    Hands-on testJunk GPU Lab
  3. Nov 13
    At temperature 0, code and list answers matched llama.cpp word for word; prose matched for about 400 characters; reasoning 5/5 on both
    Hands-on testJunk GPU Lab
  4. Nov 13
    Short prompt on one PCIe P100 16 GB, PTQ1_0 file, q8_0 KV cache: 31.9 tok/s writing, about 80 tok/s prompt reading
    Hands-on testJunk GPU Lab
  5. Nov 13
    At about 8-10K token prompt on one PCIe P100: 30.3 tok/s writing, about 110 tok/s reading
    Hands-on testJunk GPU Lab
  6. Nov 13
    At about 26-29K token prompt on one PCIe P100: 21.8 and 25.4 tok/s writing, 96 and 86 tok/s reading
    Hands-on testJunk GPU Lab

Everything said about Kindi, on the wire

Cost to run

Alternatives

llama.cpp-p100On Kindi's PTQ1_0 file the P100 patch reached only 21.3 tok/s, below Kindi's 31.9; the 2-bit file numbers are a different file