mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-03-11 06:54:08 +00:00
convert
This commit is contained in:
parent
ce59ffef15
commit
8fc7011897
15
app.py
15
app.py
@ -167,12 +167,15 @@ class Gpt4AllWebUI:
|
||||
|
||||
|
||||
def create_chatbot(self):
|
||||
return Model(
|
||||
ggml_model=f"./models/{self.config['model']}",
|
||||
n_ctx=self.config['ctx_size'],
|
||||
seed=self.config['seed'],
|
||||
)
|
||||
|
||||
try:
|
||||
return Model(
|
||||
ggml_model=f"./models/{self.config['model']}",
|
||||
n_ctx=self.config['ctx_size'],
|
||||
seed=self.config['seed'],
|
||||
)
|
||||
except Exception as ex:
|
||||
print(f"Exception {ex}")
|
||||
return None
|
||||
def condition_chatbot(self, conditionning_message):
|
||||
if self.current_discussion is None:
|
||||
self.current_discussion = self.db.load_last_discussion()
|
||||
|
12
scripts/convert model.bat
Normal file
12
scripts/convert model.bat
Normal file
@ -0,0 +1,12 @@
|
||||
@echo off
|
||||
@echo off
|
||||
set filename=../models/ggml-alpaca-7b-q4.bin
|
||||
set newname=../models/ggml-alpaca-7b-q4.bin.original
|
||||
|
||||
echo %modelPath%
|
||||
echo Converting the model to the new format...
|
||||
if not exist tmp\llama.cpp git clone https://github.com/ggerganov/llama.cpp.git tmp\llama.cpp
|
||||
cd tmp\llama.cpp
|
||||
git checkout 0f07cacb05f49704d35a39aa27cfd4b419eb6f8d
|
||||
move /y "%filename%" "%filename%.original"
|
||||
python tmp\llama.cpp\migrate-ggml-2023-03-30-pr613.py "%filename%.original" "%filename%"
|
Loading…
x
Reference in New Issue
Block a user