Giter Club home page Giter Club logo

chat-with-llama's Introduction

chat-with-llama

waifu

lets chat with multiple characters with no alignments [code is peace of shit. do not consider it for production.]

preparation

  1. make this project and prepare llama model. here is 7B llama model example:
# build this repo
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
make

# obtain the original LLaMA model weights and place them in ./models
ls ./models
65B 30B 13B 7B tokenizer_checklist.chk tokenizer.model

# install Python dependencies
python3 -m pip install torch numpy sentencepiece

# convert the 7B model to ggml FP16 format
python3 convert-pth-to-ggml.py models/7B/ 1

# quantize the model to 4-bits
./quantize ./models/7B/ggml-model-f16.bin ./models/7B/ggml-model-q4_0.bin 2

if you try bigger llama model, read original readme from llama.cpp

  1. prepare character json file. there are some examples in the charactersfolder

  2. specify a character json file with -c and a quantized model data with -m. here is 7B llama + ChatGPT example:

python3 -u chat_with_llama.py -c ./characters/ChatGPT.json -m ./models/13B/ggml-model-q4_0.bin > tmp.txt && eval "$(cat tmp.txt)"

chat-with-llama's People

Contributors

beiller avatar bengarney avatar blackhole89 avatar deepdiffuser avatar etra0 avatar ggerganov avatar jcelerier avatar jooray avatar jumang4423 avatar marckohlbrugge avatar prusnak avatar simonw avatar wizzard0 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.