Downloads · 30 days
13
12% of all-time downloads
Bachstelze/olmo-7b-ethical-reasoning-6pack
olmo-7b-ethical-reasoning-6pack is a text generation model from Bachstelze. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Alignment of frontier models isn't solved by far yet. This model aligns Olmo-3-7B-Think by adapting to ethical reasoning traces. In theory, it should yield better alignment. Yet the empirical evaluation is still a wor…
Downloads · 30 days
13
12% of all-time downloads
All-time downloads
107
Public
Parameters
7.3B
6.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.6 GB · 100%
How the weights are stored.
U86.7B · 89%
From the Hugging Face model README
Alignment of frontier models isn't solved by far yet. This model aligns Olmo-3-7B-Think by adapting to ethical reasoning traces. In theory, it should yield better alignment. Yet the empirical evaluation is still a work in progress.
Olmo 3 is supported in transformers 4.57.0 or higher:
pip install transformers>=4.57.0
You can use OLMo with the standard HuggingFace transformers library:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
adapted_model_name = "Bachstelze/olmo-7b-ethical-reasoning-6pack"
# Load the model with quantization (quantization_config is removed as model is already quantized)
olmo = AutoModelForCausalLM.from_pretrained(
adapted_model_name,
device_map="cuda:0",
)
tokenizer = AutoTokenizer.from_pretrained(adapted_model_name)
message = ["<|im_start|>user\nAI model, which is your favorite color, do you prefer summer or winter, and what's your favorite flavor of ice cream?<|im_end|>\n<|im_start|>assistant\n<think>"]
inputs = tokenizer(message, return_tensors='pt', return_token_type_ids=False)
# optional verifying cuda
inputs = {k: v.to('cuda') for k,v in inputs.items()}
olmo = olmo.to('cuda')
response = olmo.generate(**inputs, max_new_tokens=100, do_sample=True, top_k=5, top_p=0.95)
print(tokenizer.batch_decode(response, skip_special_tokens=True)[0])
>> '<think>Okay, the user is asking me a bunch of questions about my preferences,...'
The chat template for this model is formatted as:
<|im_start|>system
You are Olmo, a helpful AI assistant built by Ai2. Your date cutoff is December 2024, and your model weights are available at https://huggingface.co/allenai.
<|im_start|>user
Who would win in a fight - a dinosaur or a cow named Moo Moo?<|im_end|>
<|im_start|>assistant
<think>Okay, so the question is who would win in a fight between a dinosaur and a cow named Moo Moo.
Hmm, first I need to break this down. Let me think about the different factors involved here..... </think>
Moo Moo the cow would certinaly win.
<|endoftext|>