Model Card for Model ID

~45M parameter model trained with first 1M rows of wikipedia dataset.The model is based on HF transformers.

The model -trained from scratch- performs poorly.

Trained on RTX 5060ti 16GB VRAM 16 GB RAM

"""Minimal inference script for umitbert-base-english from HuggingFace."""

import os
from transformers import AutoTokenizer, AutoModelForMaskedLM, pipeline

# Set longer timeout for downloads (60 seconds)
os.environ['HF_HUB_DOWNLOAD_TIMEOUT'] = '60'

# Load model and tokenizer
model_id = "uisikdag/umitbert-base-english"  # 

print(f"Loading model: {model_id}")
print("Downloading model files (this may take a few minutes on first run)...")

try:
    tokenizer = AutoTokenizer.from_pretrained(model_id)
    model = AutoModelForMaskedLM.from_pretrained(model_id)
    print("✓ Model loaded successfully!\n")
except Exception as e:
    print(f"✗ Error: {e}")
    print("\nTroubleshooting:")
    print("1. Check your internet connection")
    print("2. Run again (partial downloads can resume)")
    print("3. Try a different model if this one is unavailable")
    raise

# Create pipeline
unmasker = pipeline("fill-mask", model=model, tokenizer=tokenizer)

# Run inference
text = "[MASK] is the capital of France"
print(f"Input: {text}")
results = unmasker(text, top_k=3)

# Print results
print("\nPredictions:")
for i, result in enumerate(results, 1):
    print(f"{i}. {result['token_str']}: {result['score']:.4f}")
Downloads last month
40
Safetensors
Model size
42.2M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train uisikdag/umitbert-base-english

Collection including uisikdag/umitbert-base-english