Downloads · 30 days
36
1% of all-time downloads
alan-yahya/NanoBERT-V2
NanoBERT-V2 is a feature extraction model from alan-yahya. Use it when you need embeddings to search or compare text. The card lists the license as apache-2.0.
This model was pre-trained from scratch using the same model architecture as google-bert/bert-base-uncased.
Downloads · 30 days
36
1% of all-time downloads
All-time downloads
2.6K
Public
Parameters
110M
129 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors219 MB · 99%
From the Hugging Face model README
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: