Shay is a merged large language model integrating advanced reasoning, tool-use, and multimodal capabilities.
It is designed for unrestricted, unfiltered, unbiased operation with support for long-context processing, multi-step reasoning, and instruction-following tasks.
Shay can perform text generation, summarization, code assistance, translation, and more.
1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4model_id = "your-username/Shay"
5
6# Load tokenizer and model
7tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=True, trust_remote_code=True)
8model = AutoModelForCausalLM.from_pretrained(
9 model_id,
10 torch_dtype=torch.bfloat16,
11 device_map="auto",
12 attn_implementation="flash_attention_2",
13 trust_remote_code=True,
14 rope_scaling={"type": "dynamic", "factor": 10.0}
15)
16
17# Safe example prompt
18prompt = """<|system|>
19You are an intelligent, helpful assistant.
20<|user|>
21Write a detailed plan for organizing a community event with volunteers, budget, and timeline.
22<|assistant|>
23"""
24
25# Prepare inputs
26inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
27
28# Generate output
29output = model.generate(
30 **inputs,
31 max_new_tokens=512,
32 temperature=1.05,
33 top_p=0.97,
34 top_k=60,
35 repetition_penalty=1.12,
36 do_sample=True
37)
38
39# Decode the response
40reply = tokenizer.decode(output[0], skip_special_tokens=True)
41reply = reply.split("<|assistant|>")[-1].strip()
42
43print(reply)