K00B404 commited on
Commit
a7dceb6
β€’
1 Parent(s): ceda046

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +2 -2
model.py CHANGED
@@ -4,7 +4,7 @@ from typing import Iterator
4
  import torch
5
  from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
6
 
7
- model_id = 'TheBloke/CodeLlama-7B-GGML'
8
 
9
  if torch.cuda.is_available():
10
  config = AutoConfig.from_pretrained(model_id)
@@ -51,7 +51,7 @@ def get_input_token_length(message: str, chat_history: list[tuple[str, str]], sy
51
  def run(message: str,
52
  chat_history: list[tuple[str, str]],
53
  system_prompt: str,
54
- max_new_tokens: int = 1024,
55
  temperature: float = 0.1,
56
  top_p: float = 0.9,
57
  top_k: int = 50) -> Iterator[str]:
 
4
  import torch
5
  from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
6
 
7
+ model_id = 'TheBloke/CodeLlama-7B-Instruct-GPTQ'
8
 
9
  if torch.cuda.is_available():
10
  config = AutoConfig.from_pretrained(model_id)
 
51
  def run(message: str,
52
  chat_history: list[tuple[str, str]],
53
  system_prompt: str,
54
+ max_new_tokens: int = 256,
55
  temperature: float = 0.1,
56
  top_p: float = 0.9,
57
  top_k: int = 50) -> Iterator[str]: