This model was pre-trained from scratch using the same model architecture as google-bert/bert-base-uncased.
A custom tokenizer was used, created using wordpiece from a corpus consisting of 200,000 domain-specific papers, and a cut of BookCorpus.
Intended for training on downstream tasks using Nanoscience datasets. Can be used directly to create dense vector representations for information retrieval.
Trained using 2 nodes on Polaris: https://docs.alcf.anl.gov/polaris/hardware-overview/machine-overview/
from transformers import pipeline
mlm_pipeline = pipeline("fill-mask", model="Flamenco43/NanoBERT-V2")
text = "The most common nanoparticle is [MASK]."
predictions = mlm_pipeline(text)
for prediction in predictions: print(f"Token: {prediction['token_str']}, Score: {prediction['score']:.4f}")
api_token = "your_api_token"
model_name = "Flamenco43/NanoBERT-V2"
url = f"https://api-inference.huggingface.co/pipeline/feature-extraction/{model_name}"
headers = {"Authorization": f"Bearer {api_token}"}
data = { "inputs": "This is a sample text for embedding generation." }
response = requests.post(url, headers=headers, json=data)
The following hyperparameters were used during training:
model.safetensors 209 MiBtraining_args.bin 7.1 KiB