This is a 32K version of Llama-3-70B-Instruct.
More details are coming soon.
The prompt format is unchanged from Llama 3 70B Instruct.
1import transformers
2import torch
3
4model_id = "EditorZ/Guido-Llama-3-70B-Instruct"
5
6pipeline = transformers.pipeline(
7 "text-generation",
8 model=model_id,
9 model_kwargs={"torch_dtype": torch.bfloat16},
10 device_map="auto",
11)
12
13messages = [
14 {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
15 {"role": "user", "content": "Who are you?"},
16]
17
18prompt = pipeline.tokenizer.apply_chat_template(
19 messages,
20 tokenize=False,
21 add_generation_prompt=True
22)
23
24terminators = [
25 pipeline.tokenizer.eos_token_id,
26 pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>")
27]
28
29outputs = pipeline(
30 prompt,
31 max_new_tokens=256,
32 eos_token_id=terminators,
33 do_sample=True,
34 temperature=0.6,
35 top_p=0.9,
36)
37print(outputs[0]["generated_text"][len(prompt):])