While HelpingAI3 strives for high emotional intelligence, users should be aware of potential limitations:
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4# Load the HelpingAI3 model
5model = AutoModelForCausalLM.from_pretrained("HelpingAI/HAI3-RAW")
6# Load the tokenizer
7tokenizer = AutoTokenizer.from_pretrained("HelpingAI/HAI3-RAW")
8
9# Define the chat input
10chat = [
11 {"role": "system", "content": "You are HelpingAI, an emotional AI. Always answer my questions in the HelpingAI style."},
12 {"role": "user", "content": "Introduce yourself."}
13]
14
15inputs = tokenizer.apply_chat_template(
16 chat,
17 add_generation_prompt=True,
18 return_tensors="pt"
19).to(model.device)
20
21# Generate text
22outputs = model.generate(
23 inputs,
24 max_new_tokens=256,
25 do_sample=True,
26 temperature=0.6,
27 top_p=0.9,
28)
29
30response = outputs[0][inputs.shape[-1]:]
31print(tokenizer.decode(response, skip_special_tokens=True))