DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

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

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

Short answer: Run uv sync --extra gpu --extra hf --extra web to install the GPU, Hugging Face, and web-chat dependencies; then run source .venv/bin/activate to activate the environment; run bash runs/prepare_data.sh --datasets dclm on a machine with network access to download and tokenize DCLM. All steps.

  • 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.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for datamllab/OpenEBFM and "Pretrain an EBFM model to a chosen token budget"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer