[CI] Replace large models with tiny alternatives in tests (#24057)
Signed-off-by: Tahsin Tunan <tahsintunan@gmail.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Nick Hill <nhill@redhat.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
co-authored by
Nick Hill
Harry Mellor
parent
02d709a6f1
commit
43721bc67f
@@ -35,15 +35,13 @@ def _generate(
|
||||
|
||||
|
||||
class TestOneTokenBadWord:
|
||||
MODEL = "TheBloke/Llama-2-7B-fp16"
|
||||
MODEL = "hmellor/tiny-random-LlamaForCausalLM"
|
||||
|
||||
PROMPT = "Hi! How are"
|
||||
TARGET_TOKEN = "you"
|
||||
PROMPT = "How old are "
|
||||
TARGET_TOKEN = "mn"
|
||||
|
||||
def setup_method(self, method):
|
||||
self.tokenizer = AutoTokenizer.from_pretrained(
|
||||
self.MODEL, add_prefix_space=True
|
||||
)
|
||||
self.tokenizer = AutoTokenizer.from_pretrained(self.MODEL)
|
||||
|
||||
self.num_prompt_tokens = len(self._encode(self.PROMPT))
|
||||
self.target_token_id = self._encode(
|
||||
|
||||
Reference in New Issue
Block a user