Who it is forAn ML researcher who wants to reproduce or extend EBFM pretraining on a GPU machine and needs a working end-to-end run.
The problemSetting up energy-based language model pretraining from scratch involves dependencies, data preparation, and a training budget that must be set correctly.
The outcomeA pretraining run that writes checkpoints, a clean Hugging Face export, logs, and results under the standard outputs layout.
What you need first
- Python with uv installed
- A GPU environment (the README installs the gpu extra and loads checkpoints with device="cuda")
- Network access for data preparation and Hugging Face downloads
- Enough disk space for the datasets and checkpoints (sizes are not stated in the README)
Steps
- Run
uv sync --extra gpu --extra hf --extra webto install the GPU, Hugging Face, and web-chat dependencies. - Run
source .venv/bin/activateto activate the environment. - Run
bash runs/prepare_data.sh --datasets dclmon a machine with network access to download and tokenize DCLM. - Run
TARGET_TOTAL_TOKENS=100000000 bash runs/train.shto start pretraining with a 100M token budget. - Check
outputs/checkpoints_hf/for the exported model containing config.json and model.safetensors.
Prompt for your agent
Using the OpenEBFM repo (datamllab/OpenEBFM), prepare the dclm dataset and run pretraining with TARGET_TOTAL_TOKENS set to <token_budget> via runs/train.sh. Report the path of the final checkpoints_hf/ export and confirm it contains config.json and model.safetensors.
Caveat. Data preparation needs network access and training must run where the prepared data is available, and the README does not state hardware needs or run duration.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page