Scan your whole stack
From OX Research Newsroom
Are you using marin-levanter?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.2.354.dev45467208411
marin-levanter was last scanned on 24 Nov 2026 at version 0.2.354.dev45467208411. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.2.354.dev45467208411 LATEST | 24 Nov 2026 | No rules fired |
| 0.2.353.dev45461380642 | 24 Nov 2026 | No rules fired |
| 0.2.352.dev45459185586 | 24 Nov 2026 | No rules fired |
| 0.2.351.dev45438109236 | 24 Nov 2026 | Not shown |
| 0.2.350.dev45428304593 | 24 Nov 2026 | Not shown |
Findings for v0.2.354.dev45467208411. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.2.354.dev45467208411; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Levanter is developed and released from the
marin-community/marin monorepo
(lib/levanter) and published to PyPI as marin-levanter. This README
documents the package as shipped from that monorepo.
You could not prevent a thunderstorm, but you could use the electricity; you could not direct the wind, but you could trim your sail so as to propel your vessel as you pleased, no matter which way the wind blew. — Cora L. V. Hatch
Levanter is a framework for training large language models (LLMs) and other foundation models that strives for legibility, scalability, and reproducibility:
We built Levanter with JAX, Equinox, and Haliax.
Levanter's documentation is available at levanter.readthedocs.io. Haliax's documentation is available at haliax.readthedocs.io.
jit-ted functions.Levanter was created by Stanford's Center for Research on Foundation Models (CRFM)'s research engineering team. You can also find us in the #levanter channel on the unofficial Jax LLM Discord
Here is a small set of examples to get you started. For more information about the various configuration options,
please see the Getting Started guide or the In-Depth Configuration Guide.
You can also use --help or poke around other configs to see all the options available to you.
After installing JAX with the appropriate configuration for your platform, install Levanter from PyPI:
pip install marin-levanter
wandb login # optional, we use wandb for logging
For development, clone the marin monorepo and use uv sync to install Levanter
alongside its sibling packages (Haliax, Iris, etc.) in editable form:
git clone https://github.com/marin-community/marin.git
cd marin
uv sync
Please refer to the Installation Guide for more information on how to install Levanter.
If you're using a TPU, more complete documentation for setting that up is available here. GPU support is still in-progress; documentation is available here.
As a kind of hello world, here's how you can train a GPT-2 "nano"-sized model on a small dataset.
python -m levanter.main.train_lm --config_path config/gpt2_nano.yaml
# alternatively, if you didn't use -e and are in a different directory
python -m levanter.main.train_lm --config_path gpt2_nano
This will train a GPT2-nano model on the WikiText-103 dataset.
You can also change the dataset by changing the dataset field in the config file.
If your dataset is a Hugging Face dataset, you can use the data.id field to specify it:
python -m levanter.main.train_lm --config_path config/llama_small_fast.yaml --data.id openwebtext
# optionally, you may specify a tokenizer and/or a cache directory, which may be local or on gcs
python -m levanter.main.train_lm --config_path config/llama_small_fast.yaml --data.id openwebtext --data.tokenizer "NousResearch/Llama-2-7b-hf" --data.cache_dir "gs://path/to/cache/dir"
If instead your data is a list of URLs, you can use the data.train_urls and data.validation_urls fields to specify them.
Data URLS can be local files, gcs files, or http(s) URLs, or anything that fsspec supports.
Levanter (really, fsspec) will automatically uncompress .gz and .zstd files, and probably other formats too.
python -m levanter.main.train_lm --config_path config/llama_small_fast.yaml --data.train_urls ["https://path/to/train/data_*.jsonl.gz"] --data.validation_urls ["https://path/to/val/data_*.jsonl.gz"]
You can modify the config file to change the model, the dataset, the training parameters, and more. Here's
the llama_small_fast.yaml file:
data:
train_urls:
- "gs://pubmed-mosaic/openwebtext-sharded/openwebtext_train.{1..128}-of-128.jsonl.gz"
validation_urls:
- "gs://pubmed-mosaic/openwebtext-sharded/openwebtext_val.{1..8}-of-8.jsonl.gz"
cache_dir: "gs://pubmed-mosaic/tokenized/openwebtext/"
model:
type: llama
hidden_dim: 768
intermediate_dim: 2048
num_heads: 12
num_kv_heads: 12
num_layers: 12
seq_len: 1024
gradient_checkpointing: true
trainer:
tracker:
type: wandb
project: "levanter"
tags: [ "openwebtext", "llama" ]
mp: p=f32,c=bfloat16
mesh:
axes: {data: -1, replica: 1, model: 1} # inherited defaults; override if you need TP
per_device_parallelism: 4
train_batch_size: 512
optimizer:
learning_rate: 6E-4
weight_decay: 0.1
min_lr_ratio: 0.1
Currently, we support the following architectures:
We plan to add more in the future.
For speech, we currently only support Whisper.
Here's an example of how to continue pretraining a Llama 1 or Llama 2 model on the OpenWebText dataset:
python -m levanter.main.train_lm --config_path config/llama2_7b_continued.yaml
Please see the TPU Getting Started guide for more information on how to set up a TPU Cloud VM and run Levanter there.
Please see the CUDA Getting Started guide for more information on how to set up a CUDA environment and run Levanter there.
We welcome contributions! Please see CONTRIBUTING.md for more information. Issues and pull requests are tracked at marin-community/marin.
Levanter is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.