Skip to content

Commit 9e5c4f0

Browse files
authored
Merge pull request #147 from oobabooga/main
Upstream
2 parents 7138793 + 96df4f1 commit 9e5c4f0

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Colab-TextGen-GPU.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@
8787
" !pip uninstall -y flash_attn\n",
8888
"\n",
8989
"# Parameters\n",
90-
"model_url = \"https://huggingface.co/turboderp/Mistral-7B-instruct-exl2\" #@param {type:\"string\"}\n",
91-
"branch = \"4.0bpw\" #@param {type:\"string\"}\n",
90+
"model_url = \"https://huggingface.co/TheBloke/MythoMax-L2-13B-GPTQ\" #@param {type:\"string\"}\n",
91+
"branch = \"gptq-4bit-32g-actorder_True\" #@param {type:\"string\"}\n",
9292
"command_line_flags = \"--n-gpu-layers 128 --load-in-4bit --use_double_quant\" #@param {type:\"string\"}\n",
9393
"api = False #@param {type:\"boolean\"}\n",
9494
"\n",

modules/llamacpp_model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def decode(self, ids, **kwargs):
8787
return self.model.detokenize(ids).decode('utf-8')
8888

8989
def get_logits(self, tokens):
90+
self.model.reset()
9091
self.model.eval(tokens)
9192
logits = self.model._scores
9293
logits = np.expand_dims(logits, 0) # batch dim is expected

modules/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def load_model(model_name, loader=None):
102102
elif loader in ['llama.cpp', 'llamacpp_HF', 'ctransformers']:
103103
shared.settings['truncation_length'] = shared.args.n_ctx
104104

105+
logger.info(f"LOADER: {loader}")
105106
logger.info(f"TRUNCATION LENGTH: {shared.settings['truncation_length']}")
106107
logger.info(f"INSTRUCTION TEMPLATE: {shared.settings['instruction_template']}")
107108
logger.info(f"Loaded the model in {(time.time()-t0):.2f} seconds.")

0 commit comments

Comments
 (0)