Skip to content

Commit 32f1ab5

Browse files
committed
feat: update max_new_tokens
1 parent c9a158e commit 32f1ab5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

HakaseCore/llm/llama3.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self, accelerate_engine: str = "cuda", debug: bool = False) -> None
3030
)
3131

3232
bnb_config = BitsAndBytesConfig(
33-
load_in_4bit=True,
33+
load_in_8bit=True,
3434
bnb_4bit_quant_type="nf4",
3535
bnb_4bit_use_double_quant=True,
3636
bnb_4bit_compute_dtype=torch.bfloat16,
@@ -71,7 +71,7 @@ def generate_text(self, instruction: str) -> str:
7171
do_sample=True,
7272
temperature=0.4,
7373
top_p=0.9,
74-
max_new_tokens=10000,
74+
max_new_tokens=50,
7575
eos_token_id=[
7676
self.tokenizer.eos_token_id,
7777
self.tokenizer.convert_tokens_to_ids("<|eot_id|>"),

0 commit comments

Comments
 (0)