Downloads · 30 days
25
29% of all-time downloads
kaleinaNyan/eule-qwen2.5instruct-7b-111224
eule-qwen2.5instruct-7b-111224 is a machine learning model from kaleinaNyan. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Eule is my attempt at reproducing OpenAI's o1 series of reasoning models. At the moment the point is not to hit good scores on benchmarks (this model is rather stupid), but to introduce a qualitative change in how the…
Downloads · 30 days
25
29% of all-time downloads
All-time downloads
87
Public
Parameters
7.6B
15.2 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors15.2 GB · 100%
From the Hugging Face model README
Eule is my attempt at reproducing OpenAI's o1 series of reasoning models. At the moment the point is not to hit good scores on benchmarks (this model is rather stupid), but to introduce a qualitative change in how the LLM approaches tasks. Similar to o1 models, Eule approaches its proplems in a step-by-step manner. It is also trained to reason in Russian (ultimately, I want to make a decent russian reasoning model).
Cool things I found while playing with it:
Bad things:
Atm it is trained only on math data but it can solve riddles and other problems that require step-by-step reasoning. I'm planning on adding more non-math data and then proceed to RL.
It was trained using kolibrify on a single H800 for about 6 hours. Training data consists of math problems with solutions formatted as deliberate reasoning chains. The longest reasoning chain is ~19000 tokens.
The model follows ChatML template, but introduces several new tokens:
<|REASONING_START|> - start of a reasoning chain.<|REASONING_END|> - end of a reasoning chain.<|RSS|> - start of a reasoning step.<|RSE|> - end of a reasoning step.A typical conversation formatting structure is as follows:
<|im_start|>system
System message<|im_end|>
<|im_start|>user
Problem description<|im_end|>
<|im_start|>assistant
<|REASONING_START|><|RSS|>step 1<|RSE|><|RSS|>step 2<|RSE|><|REASONING_END|>Final assistant response<|im_end|>
I use unsloth and recommend you do the same:
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name='kaleinaNyan/eule-qwen2.5instruct-7b-111224'
)
FastLanguageModel.for_inference(model)
def generate(chat, n_tokens, use_cache=True, do_sample=False):
input_str = tokenizer.apply_chat_template(chat, tokenize=False) + '<|im_start|>assistant\n<|REASONING_START|><|RSS|>'
inputs = tokenizer(input_str, return_tensors='pt')
outputs = model.generate(input_ids = inputs['input_ids'], max_new_tokens = n_tokens, use_cache = use_cache, do_sample=do_sample, temperature=0.7)
return tokenizer.batch_decode(outputs)[0]
msg = "Come up with a qubic equation and solve it"
system_message = "You are an AI assistant that thoroughly solves any task. Explore various routes and verify your solutions. Reason in Russian. Provide concise responses to the user."
chat = [
{'role': 'system', 'content': system_message},
{'role': 'user', 'content': msg},
]
response = generate(chat, 8196, do_sample=True)
print('\n'.join(response.split('<|REASONING_START|>')[-1].split('<|RSS|>')))
I'll provide it later for MATH and GSM8K benchmarks.