It was trained on the
ServiceNow-AI/R1-Distill-SFT dataset, which encourages the model to "think" before it answers. The model mimics a reflective assistant that explores, doubts, and refines its own logic before providing a final solution.
This model was trained 2x faster with
Unsloth and Huggingface's TRL library.
1You are a reflective assistant engaging in thorough, iterative reasoning, mimicking human stream-of-consciousness thinking. Your approach emphasizes exploration, self-doubt, and continuous refinement before coming up with an answer.
2<problem>
3{YOUR QUESTION HERE}
4</problem>
1from unsloth import FastLanguageModel
2
3model, tokenizer = FastLanguageModel.from_pretrained(
4 model_name = "whitelotus0/glorryllama",
5 max_seq_length = 2048,
6 dtype = None,
7 load_in_4bit = True,
8)
9FastLanguageModel.for_inference(model)
10
11# Define the prompt structure
12sys_prompt = """You are a reflective assistant engaging in thorough, iterative reasoning, mimicking human stream-of-consciousness thinking. Your approach emphasizes exploration, self-doubt, and continuous refinement before coming up with an answer.
13<problem>
14{}
15</problem>
16"""
17
18# Format the query
19query = "How many 'r's are present in 'strawberry'?"
20formatted_message = sys_prompt.format(query)
21
22messages = [
23 {"role": "user", "content": formatted_message},
24]
25
26inputs = tokenizer.apply_chat_template(
27 messages,
28 tokenize = True,
29 add_generation_prompt = True,
30 return_tensors = "pt",
31).to("cuda")
32
33outputs = model.generate(
34 input_ids = inputs,
35 max_new_tokens = 1024,
36 use_cache = True,
37 temperature = 1.5,
38 min_p = 0.1
39)
40print(tokenizer.batch_decode(outputs)[0])
1from transformers import AutoTokenizer, AutoModelForCausalLM
2
3tokenizer = AutoTokenizer.from_pretrained("whitelotus0/glorryllama")
4model = AutoModelForCausalLM.from_pretrained("whitelotus0/glorryllama", device_map="auto")
5
6prompt_template = """You are a reflective assistant engaging in thorough, iterative reasoning, mimicking human stream-of-consciousness thinking. Your approach emphasizes exploration, self-doubt, and continuous refinement before coming up with an answer.
7<problem>
8{}
9</problem>
10"""
11
12text = prompt_template.format("Explain logic clearly.")
13inputs = tokenizer(text, return_tensors="pt").to("cuda")
14
15outputs = model.generate(**inputs, max_new_tokens=1024)
16print(tokenizer.decode(outputs[0], skip_special_tokens=True))