DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to pretrain an EBFM model to a chosen token budget with Open EBFM

Prepare DCLM data and run a full pretraining job with a set token count.

  • Top pick
  • Research
  • Advanced
  • 3 hours
  • From the README
  • Any agent

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

  1. Run uv sync --extra gpu --extra hf --extra web to install the GPU, Hugging Face, and web-chat dependencies.
  2. Run source .venv/bin/activate to activate the environment.
  3. Run bash runs/prepare_data.sh --datasets dclm on a machine with network access to download and tokenize DCLM.
  4. Run TARGET_TOTAL_TOKENS=100000000 bash runs/train.sh to start pretraining with a 100M token budget.
  5. 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.

Share: 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