Views
No views yet
transformers >= 4.43.0 onward, you can run conversational inference using the Transformers pipeline abstraction or by leveraging the Auto classes with the generate() function.pip install --upgrade transformers.1import torch
2from transformers import pipeline
3
4model_id = "EpistemeAI/ReasoningCore-3B-Instruct-r01-Reflect-Math"
5pipe = pipeline(
6 "text-generation",
7 model=model_id,
8 torch_dtype=torch.bfloat16,
9 device_map="auto",
10)
11messages = [
12 {"role": "system", "content": "You are a powerful assistant Respond in the following format:
13<reasoning>
14...
15</reasoning>
16<reflecting>
17...
18</reflecting>
19<answer>
20...
21</answer>"},
22 {"role": "user", "content": "Which is bigger? 9.11 or 9.9?"},
23]
24outputs = pipe(
25 messages,
26 max_new_tokens=256,
27)
28print(outputs[0]["generated_text"][-1])1import SuperTransformer
2# Load SuperTransformer Class, (1) Loads Huggingface model, (2) System Prompt (3) Text/prompt (4)Max tokens
3SuperTransformers = SuperTransformers("EpistemeAI/ReasoningCore-3B-Instruct-r01-Reflect-Math","You are a highly knowledgeable assistant with expertise in mathematics. <reasoning>...</reasoning><reflecting>...</reflecting><answer>...</answer>","What is the area of a circle, radius=16, reason step by step", 2026)
4# 8-bit quantization
5SuperTransformers.HuggingFaceTransformer8bit()
6# or 4-bit quantization
7SuperTransformers.HuggingFaceTransformer4bit()