Skip to content

Commit

Permalink
added test for generate(strip_prompt=True)
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-gorner committed Oct 9, 2024
1 parent 16f6109 commit b098a0b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions keras_hub/src/models/llama3/llama3_causal_lm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ def test_generate(self):
prompt_ids["padding_mask"][:, :5],
)

def test_generate_strip_prompt(self):
causal_lm = Llama3CausalLM(**self.init_kwargs)
prompt = " airplane at airport"
output = causal_lm.generate(prompt, strip_prompt=True)
self.assertFalse(prompt in output)

def test_early_stopping(self):
causal_lm = Llama3CausalLM(**self.init_kwargs)
call_with_cache = causal_lm.call_with_cache
Expand Down

0 comments on commit b098a0b

Please sign in to comment.