Skip to content

Commit

Permalink
Update to Llama 2
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethleungty committed Jul 18, 2023
1 parent 80d28fb commit cf29039
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ CHUNK_SIZE: 500
CHUNK_OVERLAP: 50
DATA_PATH: 'data/'
DB_FAISS_PATH: 'vectorstore/db_faiss'
MODEL_TYPE: 'mpt'
MODEL_BIN_PATH: 'models/mpt-7b-instruct.ggmlv3.q8_0.bin'
# MODEL_TYPE: 'mpt'
# MODEL_BIN_PATH: 'models/mpt-7b-instruct.ggmlv3.q8_0.bin'
MODEL_TYPE: 'llama'
MODEL_BIN_PATH: 'models/llama-2-7b-chat.ggmlv3.q8_0.bin'
MAX_NEW_TOKENS: 256
TEMPERATURE: 0.01
3 changes: 2 additions & 1 deletion models/model_download.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Download the desired quantized MPT-7B-Instruct model from https://huggingface.co/TheBloke/MPT-7B-Instruct-GGML/tree/main
Download the desired quantized MPT-7B-Instruct model from https://huggingface.co/TheBloke/MPT-7B-Instruct-GGML/tree/main
Download the desired quantized Llama-2-7B-Chat model from https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/tree/main
2 changes: 1 addition & 1 deletion src/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


def build_llm():
# Local CTransformers MPT-7B-Instruct
# Local CTransformers model
llm = CTransformers(model=cfg.MODEL_BIN_PATH,
model_type=cfg.MODEL_TYPE,
config={'max_new_tokens': cfg.MAX_NEW_TOKENS,
Expand Down

0 comments on commit cf29039

Please sign in to comment.