theonerichy commited on
Commit
c7cbbe6
1 Parent(s): 41487b7

use updated quantized model

Browse files
app.py CHANGED
@@ -3,13 +3,13 @@ from llama_cpp import Llama
3
 
4
  MAX_TOKENS = 64
5
 
6
- llm = Llama(model_path="ggml-model-f16-q4_0.bin", n_ctx=2048)
7
 
8
  def generate_text_instruct(input_text):
9
  response = ""
10
  txt2tag_prompt = f"You are a tool that helps tag danbooru images when given a textual image description. Provide me with danbooru tags that accurately fit the following description. {input_text}"
11
  for output in llm(f" A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: {txt2tag_prompt} ASSISTANT:",
12
- echo=False, stream=True, max_tokens=64, stop=["</s>", "\n", "User:", "<unk>"]):
13
  answer = output['choices'][0]['text']
14
  response += answer
15
  yield response
 
3
 
4
  MAX_TOKENS = 64
5
 
6
+ llm = Llama(model_path="ggml-model.bin", n_ctx=2048)
7
 
8
  def generate_text_instruct(input_text):
9
  response = ""
10
  txt2tag_prompt = f"You are a tool that helps tag danbooru images when given a textual image description. Provide me with danbooru tags that accurately fit the following description. {input_text}"
11
  for output in llm(f" A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: {txt2tag_prompt} ASSISTANT:",
12
+ echo=False, stream=True, max_tokens=96, stop=["</s>", "\n", "User:", "<unk>"]):
13
  answer = output['choices'][0]['text']
14
  response += answer
15
  yield response
ggml-model-f16-q4_0.bin → ggml-model.bin RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a214d083617ae4cb2971d73235043d3505407017cd0d98639ee762618e09c177
3
- size 7323305088
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f92ee3dd8e5d103896669b0c38c4e63d6f7f87a099ad98b325683476d0cc9c14
3
+ size 9763701888