Matrix 2 is a fine-tuned version of
DeepSeek-R1-Distill-Qwen-7B , trained on a focused mixture of chain-of-thought reasoning, math, coding, and logic data. It is the flagship reasoning model of the Inelly lineup -- built for deep, accurate, step-by-step problem solving.
All samples were deduplicated and reasoning-weighted (2x oversample for CoT examples). Maximum sequence length: 512 tokens.
1 from transformers import AutoModelForCausalLM , AutoTokenizer
2
3 model = AutoModelForCausalLM . from_pretrained ( "path/to/matrix-2" , torch_dtype = torch . float16 , device_map = "auto" )
4 tokenizer = AutoTokenizer . from_pretrained ( "path/to/matrix-2" )
5
6 messages = [ { "role" : "user" , "content" : "Solve for x: 3x + 7 = 22. Show all steps." } ]
7 text = tokenizer . apply_chat_template ( messages , tokenize = False , add_generation_prompt = True )
8 inputs = tokenizer ( text , return_tensors = "pt" ) . to ( model . device )
9
10 output = model . generate ( ** inputs , max_new_tokens = 256 , temperature = 0.7 , top_p = 0.9 )
11 response = tokenizer . decode ( output [ 0 ] [ inputs . input_ids . shape [ 1 ] : ] , skip_special_tokens = True )
12 print ( response )
@misc{matrix2,
title = {Matrix 2: A 7B Chain-of-Thought Reasoning Model},
author = {Bry},
organization = {GenueAI},
year = {2026},
note = {Fine-tuned from DeepSeek-R1-Distill-Qwen-7B using QLoRA},
}