Downloads · 30 days
6
15% of all-time downloads
vraj1/bert-astronomy-full-100k
bert-astronomy-full-100k is a machine learning model from vraj1. 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 mit.
BERT model trained on 100k Wikipedia docs WITH astronomy content
Downloads · 30 days
6
15% of all-time downloads
All-time downloads
39
Public
Parameters
34.8M
418 MB on disk
Likes
0
Public
Click a slice to open those files.
.pt279 MB · 50%
From the Hugging Face model README
BERT model trained on 100k Wikipedia docs WITH astronomy content
This model is part of a research project investigating how corpus composition during pretraining affects language model performance on domain-specific tasks.
Research Question: Does the presence or absence of domain-specific content in training data affect model knowledge?
Project: Effect of Corpus on Language Model Performance
Institution: [Your University]
Course: NLP - Master's Computer Science
Date: November 2024
from transformers import BertForMaskedLM, PreTrainedTokenizerFast
import torch
# Load model and tokenizer
model = BertForMaskedLM.from_pretrained("vraj1/bert-astronomy-full-100k")
tokenizer = PreTrainedTokenizerFast.from_pretrained("vraj1/bert-astronomy-tokenizer")
# Predict masked word
text = "The galaxy is filled with billions of [MASK]."
inputs = tokenizer(text, return_tensors="pt")
mask_idx = (inputs.input_ids == tokenizer.mask_token_id).nonzero(as_tuple=True)[1]
with torch.no_grad():
logits = model(**inputs).logits
predicted_token_id = logits[0, mask_idx].argmax(axis=-1)
predicted_token = tokenizer.decode(predicted_token_id)
print(f"Predicted word: {predicted_token}")
Performance on test sets (Top-5 accuracy):
| Test Set | Accuracy |
|---|---|
| General Astronomy | TBD% |
| Advanced Astronomy | TBD% |
| General Knowledge | TBD% |
Note: Fill in actual results after evaluation
If you use this model in your research, please cite:
@misc{bert_astronomy_bert_full_100k,
author = {[Your Name]},
title = {BERT model trained on 100k Wikipedia docs WITH astronomy content},
year = {2024},
publisher = {HuggingFace},
howpublished = {\url{https://huggingface.co/vraj1/bert-astronomy-full-100k}},
}
This model is designed for research purposes to understand corpus effects on language models. It should not be used for:
For questions about this research project, please contact: [Your Email]
MIT License - Free to use for research and educational purposes.