Skip to main content

Dew

Dew is a small-model architecture family: Gated DeltaNet layers (a linear-time recurrent memory) mixed with attention, with optional extras for thinking longer on hard words. It runs as a causal language model or as a bidirectional encoder, plugs into Hugging Face transformers, and exports to ONNX.

pip install dew-lm            # PyTorch only
pip install "dew-lm[hf]"      # + transformers Auto classes
pip install "dew-lm[export]"  # + ONNX export
from dew import DewForCausalLM, dew_config, fit_params

cfg = fit_params(dew_config("dew-1-hybrid", vocab_size=16384), 15_000_000)   # size it to ~15M parameters
model = DewForCausalLM(cfg)

Presets

Preset Layers Use Status
dew-1-hybrid DeltaNet, DeltaNet, attention, repeated causal LM (the default) stable
dew-1-hybrid-light DeltaNet, attention, attention, repeated causal LM, more attention stable
dew-1-dense attention only causal LM baseline stable
dew-1-enc-hybrid hybrid, bidirectional encoder (masked LM); used by the YellowMIST encoders stable
dew-1-enc-dense attention only, bidirectional encoder baseline stable
dew-1-nap, dew-1-napskip, dew-1-loop hybrid with a Mixture-of-Experts feed-forward ("Nap"), with optional layer skipping and looping larger models research

The research presets are where the full Dew design is heading (Mixture-of-Experts pays off at larger sizes). They are tested by the self-test but not yet trained at scale; their interfaces may change.

Results so far

A 3-seed pilot at 15M parameters, on West Africa text (the YellowMIST data), same data and training steps for both:

Model masked characters mark restoration punctuation F1 capitals F1
dew-1-enc-hybrid 65.89 ± 0.13 82.89 ± 0.04 36.67 ± 0.35 59.07 ± 0.59
transformer encoder (same size) 64.43 ± 0.19 82.44 ± 0.02 34.33 ± 1.10 57.07 ± 1.44

The hybrid wins every test by more than the seed spread. The full YellowMIST encoders and their results per language are on Hugging Face (YellowMIST-Encoder-15M-<region>). Dew is a research preview: tested at small sizes (about 15M parameters) so far, not yet at larger scales.

Dew or a plain transformer?

Measured on our models at about 15M parameters; your sizes and hardware may differ.

Where Dew is better

  • Quality at the same size: the encoder pilot above, every test won by more than the seed spread.
  • Long context: at a 2,048-token context, dew-1-hybrid reached a lower held-out loss than a same-size transformer (4.910 against 5.013), and the gap grew the further into the text it was predicting.
  • Long text on CPU: past about 2,000 characters the encoder is faster than a same-size transformer (4,096 characters: 1.76 s against 2.58 s on one thread, 0.99 s against 1.28 s on four).
  • Memory grows more slowly (by design): DeltaNet layers keep a fixed-size state instead of a cache that grows with the text. The attention layers in the hybrid still grow, so memory still grows, just more slowly.

Where a transformer is better

  • Short text on CPU: the transformer is faster up to about 2,000 characters (128 characters: 19 ms against Dew's 31 ms on one thread, 9 ms against 24 ms on four; 512 characters: 100 ms against 142 ms, 37 ms against 86 ms). The cost is DeltaNet's per-character state update, read in both directions in the encoder.
  • Training speed: the hybrid trained about 27% slower than a same-size transformer in our decoder runs on GPU.
  • Maturity: transformers have years of tooling and optimised kernels everywhere; Dew is a research preview.

Speeds: 8-bit ONNX on a desktop CPU (AMD Ryzen 9 5900XT), measured before our switch to weight-only 8-bit; we will re-measure. Quantised to 8 bits (weights only), Dew models are the same size as the transformer (about 16 MB at 15M parameters) and agree with full precision on over 99.9% of decisions in our task models.

In short: Dew suits message- and document-length text and long context; for very short inputs where every millisecond counts (per keystroke), a transformer is faster on CPU today. A lighter variant for short text is on our list.

Checks

python -m dew.selftest     # chunked == step-by-step maths, presets, Hugging Face round trip, ONNX export

On a GPU, flash-linear-attention (pip install "dew-lm[fast]") speeds up training; it is checked against the PyTorch path when installed.

Built on

Licence

Apache-2.0.

Metadata

Release files for dew-lm 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dew-lm 1.0.2
File Size Uploaded Provenance Actions
dew_lm-1.0.2.tar.gz 27.6 kB With provenance Details for dew_lm-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dew-lm 1.0.2
File Interpreter ABI Platform Actions
dew_lm-1.0.2-py3-none-any.whl Python 3 none any Details for dew_lm-1.0.2-py3-none-any.whl

Total release size: 56.0 kB

Release files / dew_lm-1.0.2.tar.gz

Download URL dew_lm-1.0.2.tar.gz
Size 27.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f557925711a12b1e4c8069985d952606179b47d4b0390bf9054a3ce0956d6549
BLAKE2b-256 checksum
How to use checksums
4973df05ed637d00eec1357c28d14a3fd50853c89f1c0d526a0e35c64304688d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / dew_lm-1.0.2-py3-none-any.whl

Download URL dew_lm-1.0.2-py3-none-any.whl
Size 28.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
21710d98777c8eeea16fde3547f06532615c22548f5dc57caefe46b128c2fb8d
BLAKE2b-256 checksum
How to use checksums
ed2857ff483aeb6219ce8ed69781dc20e0d5e963bd77b2ea613ec3f78b915fed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Security for dew-lm 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dew_lm-1.0.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page