This repository contains the weights for the facebook/opt-125m model after fine-tuning on the wikitext-2-raw-v1 configuration of the WikiText dataset using a standard Causal Language Modeling (CLM) objective.
This model is a version of the OPT (Open Pre-trained Transformer) architecture with 125 million parameters. It was fine-tuned solely on the WikiText-2 dataset. The primary goal of this fine-tuning process, as executed by the training script, was to adapt the model to the language patterns, vocabulary, and style present in the WikiText-2 corpus by learning to predict the next token in a sequence.
Note on Project Context: While this fine-tuning experiment was conducted as part of a larger initiative by "天算AI" / "SafeSky AI" aiming to develop AI Safety models, this specific model does not possess specialized AI safety capabilities. It was trained on a general-purpose dataset (WikiText-2) using a standard language modeling task, and should be considered a foundational experiment in the model fine-tuning process rather than a dedicated AI Safety model.
Intended Use:
Limitations:
You can use this model with the Hugging Face transformers library for text generation:
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Load model and tokenizer
model_id = "jinv2/opt125m-wikitext2-finetuned"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
# Set device
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model.to(device)
# Example prompt
prompt = "Artificial intelligence is transforming the world by"
# Tokenize prompt
inputs = tokenizer(prompt, return_tensors="pt").to(device)
# Generate text
output_sequences = model.generate(
input_ids=inputs["input_ids"],
attention_mask=inputs["attention_mask"],
max_length=60,
num_return_sequences=1,
do_sample=True,
temperature=0.7,
top_k=50
)
# Decode and print
generated_text = tokenizer.decode(output_sequences[0], skip_special_tokens=True)
print(generated_text)
This model was fine-tuned from facebook/opt-125m on the wikitext-2-raw-v1 dataset using the Causal Language Modeling task with the Hugging Face Trainer. Key settings likely included a learning rate around 2e-5, standard text tokenization with padding and truncation, and training for a small number of epochs. (You can add more specific details here if you remember them)
This model represents an early experimental step within the broader AI Safety initiative of "天算AI" / "SafeSky AI". Future work will involve using safety-focused datasets and training methodologies.