Configuration Parsing Warning:In UNKNOWN_FILENAME: "auto_map.AutoTokenizer" must be a string

EBFM-FineWeb-160M

OpenEBFM 160M model (variant d12) trained on FineWeb. This repository contains a Hugging Face Transformers-compatible export for the pretraining checkpoint.

How to Use

Install the runtime dependencies:

pip install torch transformers tiktoken

Load the tokenizer and model with the custom OpenEBFM code enabled:

import torch
from transformers import AutoModelForMaskedLM, AutoTokenizer

repo_id = "guan-wang/EBFM-FineWeb-160M"
tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
model = AutoModelForMaskedLM.from_pretrained(
    repo_id,
    trust_remote_code=True,
)

device = "cuda" if torch.cuda.is_available() else "cpu"
model.to(device)
model.eval()
model.requires_grad_(False)
inputs = tokenizer("Hello world", return_tensors="pt").to(device)
outputs = model(**inputs)

print(outputs.logits.shape)

The first load may prompt you to review and allow the repository's custom model code. Loading remote Python code requires trust_remote_code=True.

Model Details

Detail Value
Model family OpenEBFM energy-based language model
Architecture Custom OpenEBFM implementation (d12)
Parameter scale 160M
Training dataset FineWeb
Training stage pretraining
Transformer blocks 12
Embedding dimension 768
Attention heads 6
Context length 2048
Vocabulary size 32768

The parameter scale is the label used for this model in the OpenEBFM model configuration. The architecture and sequence settings above are read from the exported checkpoint configuration.

Files

  • config.json: model configuration.
  • model.safetensors: model weights in the standard Transformers format.
  • modeling_ebfm.py: remote model and tokenizer implementation.
  • configuration_ebfm.py: remote configuration implementation.
  • tokenizer.pkl: serialized EBFM tokenizer.
  • tokenizer_config.json: tokenizer auto-loading configuration.
  • token_bytes.pt: token byte table used by OpenEBFM metrics.

Related Resource

The code is maintained in the OpenEBFM repository. The technical report is at https://huggingface.co/papers/2610.33005

If you found this work helpful, please star and cite this work:

@article{pu2026openesm,
  title={OpenESM: Energy-Steered Models Are Scalable Foundation Learners},
  author={Pu, Yuan and Lu, Yudong and Wang, Ting and Hong, Zhicong and Li, Qinuo and Wu, Xuansheng and Zou, Na and Hu, Xia and Wang, Guanchu},
  journal={arXiv preprint arXiv:2610.33005},
  year={2026}
}
Downloads last month
370
Safetensors
Model size
0.2B params
Tensor type
I64
·
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including guan-wang/EBFM-FineWeb-160M

Paper for guan-wang/EBFM-FineWeb-160M