`ggllama` is a Rust port of ggerganov's llama.cpp.

Related tags

Command-line ggllama
Overview

Notice

llama-rs beat me to the punch. I'll be contributing to that instead.

The original README is preserved below.


ggllama

ggllama is a Rust port of ggerganov's llama.cpp, so that it can be deployed with greater ease.

The current version uses ggml directly, so you will require a C compiler. PRs welcome to switch to a more Rust-y solution!

Does it work?

Not at the time of writing, no. It runs, but the inference is garbage:

23:59:53 [INFO] ℚ
23:59:54 [INFO]  Насе
23:59:54 [INFO] rsg
23:59:54 [INFO]  eredetiből
23:59:54 [INFO]  Хронологија
23:59:55 [INFO] flug
23:59:55 [INFO]  odkazy
23:59:55 [INFO] orith
23:59:55 [INFO] gior
23:59:56 [INFO]
23:59:56 [INFO]  logs
23:59:56 [INFO] BeanFactory
23:59:56 [INFO] gesamt
23:59:56 [INFO]  bezeichneter
23:59:57 [INFO] Webachiv
23:59:57 [INFO] brie
23:59:57 [INFO]  listade
23:59:57 [INFO] ⊤
23:59:58 [INFO] xtart
23:59:58 [INFO]  kallaste
23:59:58 [INFO] makeText
23:59:58 [INFO]  eredetiből
23:59:59 [INFO] daten
23:59:59 [INFO]  Мос
23:59:59 [INFO] lacht

The evaluation returns the wrong logits when given input to process. I'll need to debug this further.

Build requirements

ggml-sys is built with the target features passed into the Rust compiler, so you'll need to set your RUSTFLAGS appropriately:

RUSTFLAGS='-C target-feature=+avx2,+fma,+f16c'

Note that f16c was stabilised in Rust 1.68.0.

Model preparation

Model preparation is identical to the original repo. This initial version doesn't port quantize yet.

I used Conda to create my Python environment:

conda create --name llama python=3.10
conda activate llama
python3 -m pip install torch numpy sentencepiece

cd vendor/llama.cpp
python3 convert-pth-to-ggml.py models/7B/
You might also like...
port sniffer, multithreading

SniffSniff I am trying to learn Rust programming language. Here is a small project that sniffs the ports of a given host. I want to give some info wha

A command-line tool to easily kill processes running on a specified port.

killport killport is a command-line utility for killing processes listening on specific ports. It's designed to be simple, fast, and effective. The to

A simple demo to bind a TCP port with k8s exec channel.k8s.io websocket API.

k8s-webterm-connector Tired with web terminals? Let's use it with CLI! This is just a simple demo to bind a TCP port with k8s exec websocket API, whic

Rust-advent - Learning Rust by solving advent of code challenges (Streaming live on Twitch every Monday)
Rust-advent - Learning Rust by solving advent of code challenges (Streaming live on Twitch every Monday)

Rust advent 🦀 🐚 Learning Rust by implementing solutions for Advent of Code problems. 🎥 HEY, we are live-streaming our attempts to solve the exercis

Rust-clippy - A bunch of lints to catch common mistakes and improve your Rust code

Clippy A collection of lints to catch common mistakes and improve your Rust code. There are over 450 lints included in this crate! Lints are divided i

Rust-battery - Rust crate providing cross-platform information about the notebook batteries.

battery Rust crate providing cross-platform information about the notebook batteries. Table of contents Overview Supported platforms Install Examples

A Rust-based shell script to create a folder structure to use for a single class every semester. Mostly an excuse to use Rust.

A Rust Course Folder Shell Script PROJECT IN PROGRESS (Spring 2022) When completed, script will create a folder structure of the following schema: [ro

Rust Imaging Library's Python binding: A performant and high-level image processing library for Python written in Rust

ril-py Rust Imaging Library for Python: Python bindings for ril, a performant and high-level image processing library written in Rust. What's this? Th

FTL Rust Demangler is a command-line tool for demangling symbol names that are mangled with the Rust convention

FTL Rust Demangler is a command-line tool for demangling symbol names that are mangled with the Rust convention. It takes a mangled symbol name as input and returns the demangled name

Owner
Philpax
gamedev / systems programming / he/him
Philpax
Rust port of pexpect

rexpect Spawn, control, and respond to expected patterns of child applications and processes, enabling the automation of interactions and testing. Com

Philipp Keller 177 Dec 25, 2022
Dog command for *nix systems, Rust port of dog.

dog-rs Dog command for *nix systems, Rust port of dog. Because there is a cat command, should be a dog command too. It was written completely using VS

Juanjo Salvador 2 Sep 29, 2021
Rust port of InfectedRose.Interface

Rust port of Wincent's InfectedRose.Interface. It is not finished; only adding to the database is possible at the moment, editing and removing is not,

zaop 3 Feb 2, 2022
This is a command line port of the game Wordle in Rust

Wordle.rs Welcome to Wordle.rs! This is a command line port of the game Wordle in Rust. I built this in order to get more familiar with programming in

Brock Herion 5 Apr 8, 2022
A Rust port of the command line program playing with the cutscenes files (USM) from Genshin Impact.

GI-cutscenes : Rust Remix A command line program playing with the cutscene files (USM) from Genshin Impact, reimplemented in Rust. Much like its origi

Lymkwi 5 Nov 6, 2022
Rust port of https://github.com/hunar4321/life_code with some fun features.

Smarticles A Rust port of Brainxyz's Artificial Life simulator with some fun features. A simple program to simulate primitive Artificial Life using si

Chevy Ray Johnston 15 Dec 24, 2022
png_defringe_rs is a port of Immorpher's PNG Defringe program written in Rust to achieve easier installation and faster performance.

png_defringe_rs png_defringe_rs is a port of Immorpher's PNG Defringe program written in Rust to achieve easier installation and faster performance. U

null 2 Nov 17, 2022
A port of everything to Rust 🦀

everything.rs Do you ever feel like washing your hands after a coding session, disgusted at having to use essential Unix utilities with not the tinies

null 8 Apr 17, 2023
🧮 Boolean expression evaluation engine. A Rust port of boolrule.

coolrule My blog post: Porting Boolrule to Rust Boolean expression evaluation engine (a port of boolrule to Rust). // Without context let expr = coolr

Andrew Healey 3 Aug 21, 2023
Truly universal encoding detector in pure Rust - port of Python version

Charset Normalizer A library that helps you read text from an unknown charset encoding. Motivated by original Python version of charset-normalizer, I'

Nikolay Yarovoy 29 Oct 9, 2023