• Stars
    star
    130
  • Rank 277,575 (Top 6 %)
  • Language
    Rust
  • Created 9 months ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Fast-LLM powered by Candle πŸ¦€

Yo! I really have no clue what I'm doing here, but here's me learning to rust by making candle's quantised llm examples into its own package.

None of the work here is original and all attributions should go to Laurent & Nicolas who made this gem of a library and with ready-to-use examples.

What does it do?

It allows you to run popular GGUF checkpoints on the Hugging Face Hub via Candle. Works on Macs with Metal or on CPU (although CPU is much much slower).

This is an alpha release and I expect quite a lot of this to change in the short term.

How do you run this bad boi?

Step 1: git clone https://github.com/Vaibhavs10/fast-llm.rs/

Step 2: cd fast-llm.rs

Step 3: cargo run --features metal --release -- --which 7b-mistral-instruct-v0.2 --prompt "What is the meaning of life according to a dog?" --sample-len 100

Note: you can remove the --features metal to run inference on CPU.

Check how to install Rust and how to use the CLI if you need to.

Which models are supported?

  1. Mistral 7B
  2. Llama 7B/ 13B/ 34B
  3. CodeLlama 7B/ 13B/ 34B
  4. Mixtral 8x7B

You can also bring your own GGUF checkpoint by passing a --model.

More details

Installing Rust

Just follow the official instructions.

How to use the CLI

When you use cargo run, command-line arguments go to cargo. Use -- to send them to the fast-llm binary. The following will compile the code in release mode (a cargo option), and then list all the options fast-llm supports.

cargo run --release -- --help

By default, fast-llm sends your prompt to the LLM, prints the response and quits. You can use interactive or chat mode too:

  • cargo run --release -- --prompt interactive. Runs in interactive mode. You can ask multiple independent queries, previous context is not retained.

  • cargo run --release -- --prompt chat. Runs in chat mode. Carries conversation history, just like when using ChatGPT or HuggingChat. In this mode you'll get best results with one of the Instruct versions of the models, Mistral, Zephyr, or OpenChat, as all these models are designed for chat.

More Repositories

1

insanely-fast-whisper

Jupyter Notebook
7,212
star
2

fast-whisper-finetuning

Jupyter Notebook
320
star
3

ml-with-audio

HF's ML for Audio study group
Jupyter Notebook
159
star
4

translate-with-whisper

Jupyter Notebook
127
star
5

notebooks

Jupyter Notebook
54
star
6

10_days_of_deep_learning

10 days 10 different practical applications of Deep Learning (primarily NLP) using Tensorflow and Keras
Jupyter Notebook
31
star
7

on-device-llm-playground

A repo with scripts to test and play around with Facebook's recent llama models! πŸ€—
Python
25
star
8

ml-with-text

[Tutorial] Demystifying Natural Language Processing with Python
Jupyter Notebook
24
star
9

ml-with-timeseries

Machine Learning with Time Series data
Jupyter Notebook
19
star
10

how-to-asr

Jupyter Notebook
16
star
11

dcase-2023-workshop

Jupyter Notebook
14
star
12

deploy-audio-endpoints

Python
7
star
13

turbo-llm

Python
7
star
14

how-to-whisper

Jupyter Notebook
6
star
15

scratchpad

Jupyter Notebook
3
star
16

how-to-computational-linguistics

2
star
17

zomato-web-scraper

A nifty tool to scrape data off Zomato and mail it to you.
Python
2
star
18

learn-ml

Modified notebooks (single) from kaggle.com/learn with added nuances
Jupyter Notebook
2
star
19

news_classifier

Python
2
star
20

Toucan-Fork

Python
2
star
21

benchmark-asr

Python
2
star
22

score-audio

2
star
23

speech-ecosystem-scripts

2
star
24

Vaibhavs10

VB's GH landing page
Python
2
star
25

anli-performance-prediction

Python
1
star
26

simple-text-message-app

A simple text message notification app
Python
1
star
27

ml-on-gcp

The repository walks through a Data Scientist focused way of building and deploying Machine Learning models on Google Cloud
Jupyter Notebook
1
star
28

what-the-audio

1
star
29

snippets

Random but often useful snippets for day to day hacking!
Python
1
star
30

static-resume

A static resume
HTML
1
star
31

sentiment-movie-imdb

Simple review sentiment classifier!
Jupyter Notebook
1
star
32

summer_of_bitcoin

Python
1
star
33

RC-Interview-task

Graph manipulation using PostgreSQL and Networkx
Jupyter Notebook
1
star
34

facebook-bot-flask

A facebook messenger bot built using flask as a rest API
Python
1
star
35

junk_models

1
star
36

kaggle-titanic

An open cheat sheet which goes in somewhat detail in understanding the Machine Learning concepts and some code :)
Jupyter Notebook
1
star
37

common_voice_dataset_generator

Python
1
star
38

quora-question-pair

Code and analysis for Quora question pair challenge on Kaggle
Jupyter Notebook
1
star
39

homebred-tap

Ruby
1
star
40

stats101

Code and high level information to get started with Statistics and Math required for Machine Learning
Jupyter Notebook
1
star