Downloads · 30 days
5
4% of all-time downloads
maxpe/gpt-oss-climate-finetuned
gpt-oss-climate-finetuned is a machine learning model from maxpe. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This dataset is designed for instruction finetuning OpenAI's gpt-oss-20b model on Reddit-style climate change discussions. The model will learn to generate contextually appropriate Reddit posts (submissions and commen…
Downloads · 30 days
5
4% of all-time downloads
All-time downloads
130
Public
Parameters
20.9B
41.9 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors41.8 GB · 100%
From the Hugging Face model README
This dataset is designed for instruction finetuning OpenAI's gpt-oss-20b model on Reddit-style climate change discussions. The model will learn to generate contextually appropriate Reddit posts (submissions and comments) at various depths within discussion threads.
The dataset uses OpenAI's harmony response format, which is required for gpt-oss-20b models.
climatechange_reddit_gpt_oss_hf/ - Hugging Face Dataset format (41MB)
train/ - 9,000 training examplesvalidation/ - 1,000 validation examplesclimatechange_reddit_gpt_oss_train.jsonl - Training data in JSONL format (39MB)
climatechange_reddit_gpt_oss_val.jsonl - Validation data in JSONL format (4.1MB)
The finetuning task is a masked post prediction task:
Each training example follows this structure:
<|start|>system<|message|>You are a helpful AI assistant participating in Reddit discussions about climate change...
Reasoning: [low|medium|high]
# Valid channels: analysis, final<|end|>
<|start|>user<|message|>[INSTRUCTION]
Here is the conversation thread with one post marked as [MASKED POST - TO BE GENERATED]:
[CONTEXT WITH MASKED POST]<|end|>
<|start|>assistant<|message|><|start|>analysis<|message|>[BRIEF REASONING]<|end|>
<|start|>final<|message|>[GENERATED POST]<|end|><|end|>
Each JSONL record contains:
{
"text": "Full harmony-formatted conversation (for training)",
"instruction": "Human-readable instruction",
"context": "Conversation context without masked post",
"response": "Expected response (masked post content)",
"reasoning_level": "low|medium|high",
"sequence_id": 1234,
"masked_position": 2,
"masked_depth": 3,
"masked_type": "comment|submission",
"post_id": "abc123",
"author": "username"
}
from datasets import load_from_disk
# Load the dataset
dataset = load_from_disk('climatechange_reddit_gpt_oss_hf')
# Access splits
train_data = dataset['train']
val_data = dataset['validation']
# The 'text' column contains harmony-formatted conversations
print(train_data[0]['text'])
from datasets import load_dataset
dataset = load_dataset('json', data_files={
'train': 'climatechange_reddit_gpt_oss_train.jsonl',
'validation': 'climatechange_reddit_gpt_oss_val.jsonl'
})
from transformers import AutoTokenizer, AutoModelForCausalLM, TrainingArguments, Trainer
# Load model and tokenizer
model_name = "openai/gpt-oss-20b"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
# Tokenize function
def tokenize_function(examples):
return tokenizer(examples['text'], truncation=True, padding='max_length', max_length=2048)
# Tokenize dataset
tokenized_train = train_data.map(tokenize_function, batched=True)
tokenized_val = val_data.map(tokenize_function, batched=True)
# Training arguments
training_args = TrainingArguments(
output_dir="./gpt-oss-climate-finetuned",
num_train_epochs=3,
per_device_train_batch_size=4,
per_device_eval_batch_size=4,
warmup_steps=500,
weight_decay=0.01,
logging_dir='./logs',
logging_steps=100,
evaluation_strategy="steps",
eval_steps=500,
save_steps=1000,
)
# Trainer
trainer = Trainer(
model=model,
args=training_args,
train_dataset=tokenized_train,
eval_dataset=tokenized_val,
)
# Train
trainer.train()
This dataset enables the model to:
The dataset is derived from Reddit posts and should be used in accordance with Reddit's Terms of Service and content policies.
If you use this dataset, please acknowledge: