doubledsbv
commited on
Commit
•
49aa929
1
Parent(s):
235f4df
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ model_id = "doubledsbv/Llama-3-Kafka-8B-v0.1"
|
|
9 |
|
10 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16)
|
11 |
tokenizer = transformers.AutoTokenizer.from_pretrained(model_id)
|
12 |
-
streamer = TextStreamer(tokenizer)
|
13 |
|
14 |
pipeline = transformers.pipeline(
|
15 |
model=model, tokenizer=tokenizer,
|
@@ -47,8 +47,9 @@ def chat_function(message, history, system_prompt,max_new_tokens,temperature):
|
|
47 |
eos_token_id=terminators,
|
48 |
do_sample=True,
|
49 |
temperature=temperature,
|
50 |
-
top_p=0.9,
|
51 |
-
|
|
|
52 |
)
|
53 |
return outputs[0]["generated_text"][len(prompt):]
|
54 |
|
|
|
9 |
|
10 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16)
|
11 |
tokenizer = transformers.AutoTokenizer.from_pretrained(model_id)
|
12 |
+
#streamer = TextStreamer(tokenizer)
|
13 |
|
14 |
pipeline = transformers.pipeline(
|
15 |
model=model, tokenizer=tokenizer,
|
|
|
47 |
eos_token_id=terminators,
|
48 |
do_sample=True,
|
49 |
temperature=temperature,
|
50 |
+
#top_p=0.9,
|
51 |
+
min_p=0.075,
|
52 |
+
#streamer=streamer
|
53 |
)
|
54 |
return outputs[0]["generated_text"][len(prompt):]
|
55 |
|