alt.freeweights.text / Carbon-500M
From: HuggingFaceBio <huggingface.co/HuggingFaceBio>Newsgroups: alt.freeweights.textSubject:

Carbon-500M

Date: 2026-11-15Commit: 2ac078dSigned: 2DC28CC7B26A283B ✓

Text generation model with 512M parameters. Safetensors weights, 1.03 GB in all. Published by HuggingFaceBio under Apache-2.0.

512M params1.03GBCarbon-500Msafetensorspermissive
FactsParams512MSize1.03 GBFormatssafetensorsTasktext generationLicenseApache-2.0From sourcepermissive
$ fw get HuggingFaceBio/Carbon-500M
# manifest sha256 c1e0e9a0e2bb… · 1.03 GB · 11 files
$ fw verify ./Carbon-500M HuggingFaceBio/Carbon-500M
From sourceHosted (signed)HuggingFaceBio/Carbon-500MLast check: 2026-11-15 03:33 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Overview

Size
1.03 GB
Weights
1.02 GB (safetensors)
Parameters
512M
Formats
safetensors
Task
text generation
License
Apache-2.0 (permissive)
Files
11, each with a sha256
Publisher
HuggingFaceBio
Added
2026-11-15
Section
alt.freeweights.text
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 03:33 UTCpassed

Model card

From the publisher at commit 2ac078d. Shown as plain text with links; images open at the publisher.

Image: image

Technical Report 🧬

Carbon-500M#

A small generative DNA model from the Carbon family.

Carbon-500M is intended primarily as a draft model for speculative decoding — it shares the tokenizer and DNA template format of Carbon-3B and Carbon-8B, so it can be paired with either as the target model to reduce wall-clock generation cost at no quality loss. It is not designed to be competitive with the 3B/8B Carbon models on downstream benchmarks.

For the full design rationale, tokenizer specification, evaluation protocol, and usage notes (DNA tag wrapping, 6-mer constraints, scoring helpers), please refer to the Carbon-3B model card — this card focuses only on facts specific to Carbon-500M.

Facts#

  • 500M-parameter decoder-only autoregressive DNA model (Llama-style architecture).
  • Hybrid tokenizer shared with the rest of the Carbon family (6-mer for DNA + Qwen3 BPE for English text; each DNA token ≈ 6 bp).
  • Pre-training tokens: 600B 6-mer tokens (≈ 3.6 T DNA base pairs).
  • Sequence length: 8,192 tokens (≈ 49 kbp).
  • Loss schedule: cross-entropy 0 → 300 B tokens, then switch to the hybrid Factorised Nucleotide Supervision (FNS) loss from 300 B → 600 B tokens. The switch happens later than for Carbon-3B because Carbon-500M's training was very stable and tolerated the later transition.
  • Data mixture: identical to the decay-phase mixture used by Carbon-3B — 50 % Generator-style eukaryotic genes / 25 % mature mRNA / 10 % splice-enriched mRNA / 15 % GTDB bacterial genomes. Same weights across the whole 600 B run.
  • Precision: bfloat16. Optimizer: AdamW. Positional embedding: RoPE.
  • No long-context training stage — the model stays at its 8,192-token native context (≈ 49 kbp).
  • Released as a standard Hugging Face causal LM (LlamaForCausalLM).

How to use#

Wrap DNA in <dna>...</dna> exactly as for the larger models. See the Carbon-3B card for tokenizer details.

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

repo = "HuggingFaceBio/Carbon-500M"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    repo, dtype=torch.bfloat16,
).cuda().eval()

prompt = "<dna>ATGCGCTAGCTACGATCGATCGTAGCTAGCTAGCTAGCTACG"
inputs = tok(prompt, return_tensors="pt", add_special_tokens=False).to("cuda")
out = model.generate(**inputs, max_new_tokens=64, do_sample=False)
print(tok.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))

Carbon-500M is most useful when paired with a larger Carbon model as the verifier. Hugging Face Transformers supports this natively through the assistant_model argument:

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

tok    = AutoTokenizer.from_pretrained("HuggingFaceBio/Carbon-3B", trust_remote_code=True)
draft  = AutoModelForCausalLM.from_pretrained(
    "HuggingFaceBio/Carbon-500M", dtype=torch.bfloat16
).cuda().eval()
target = AutoModelForCausalLM.from_pretrained(
    "HuggingFaceBio/Carbon-3B",   dtype=torch.bfloat16
).cuda().eval()

prompt = "<dna>ATGCGCTAGCTACGATCGATCGTAGCTAGCTAGCTAGCTACG"
inputs = tok(prompt, return_tensors="pt", add_special_tokens=False).to("cuda")
out = target.generate(
    **inputs, max_new_tokens=256, do_sample=False,
    assistant_model=draft,
)
print(tok.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))

Output is guaranteed identical to greedy decoding with the target model alone; only wall-clock latency is reduced.

Base-pair-level generation and scoring#

The fns branch loads custom modeling code for Factorized Nucleotide Supervision (FNS). Carbon still uses its efficient 6-mer tokenizer, but during generation each selected 6-mer is assembled from six per-position nucleotide distributions, giving base-pair-level control over decoded DNA. Use this branch when you need exact base-pair counts, per-position masks, or temperature/top-p behavior applied at the nucleotide level rather than over the 4,096-way 6-mer distribution:

import math
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "HuggingFaceBio/Carbon-500M"
revision = "fns"
device = "cuda"

tokenizer = AutoTokenizer.from_pretrained(model_id, revision=revision, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    revision=revision,
    trust_remote_code=True,
    dtype=torch.bfloat16,
).to(device).eval()

context = "ATGCGCTAGCTACGATCGATCGTAGCTAGCTAGCTAGCTACG"
n_bp = 60

inputs = tokenizer(f"<dna>{context}", return_tensors="pt", add_special_tokens=False).to(device)

with torch.no_grad():
    output_ids = model.generate(
        **inputs,
        max_new_tokens=math.ceil(n_bp / tokenizer.k),
        do_sample=False,
        pad_token_id=tokenizer.eos_token_id,
    )

generated_ids = output_ids[0, inputs.input_ids.shape[1]:]
generated_dna = tokenizer.decode(generated_ids, skip_special_tokens=True)[:n_bp]

print(generated_dna)

The same per-base marginals are exposed through score_sequence(), which returns the probability assigned to the observed base at each position. Taking the mean log probability gives a base-pair-level sequence score, where higher values indicate higher model likelihood:

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "HuggingFaceBio/Carbon-500M"
revision = "fns"
device = "cuda"

tokenizer = AutoTokenizer.from_pretrained(model_id, revision=revision, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    revision=revision,
    trust_remote_code=True,
    dtype=torch.bfloat16,
).to(device).eval()

reference = "GGGCTATAAAGGCCATCGATCGATCGATCGATCGATCGATCG"
perturbed = "GGGCGCGCGCGGCCATCGATCGATCGATCGATCGATCGATCG"

with torch.no_grad():
    bp_probs, actual_probs = model.score_sequence([reference, perturbed])

scores = [torch.log(p.clamp_min(1e-12)).mean().item() for p in actual_probs]

print(f"reference mean bp logp: {scores[0]:.4f}")
print(f"perturbed mean bp logp: {scores[1]:.4f}")
print(f"reference preferred: {scores[0] > scores[1]}")

Evaluation#

Carbon-500M is benchmarked against ≈ 1B-parameter DNA models on the standard Carbon evaluation suite. See the Carbon-3B card for the task definitions and methodology.

Limitations#

⚠️ Genetic data is highly sensitive. Depending on how this model is used (local download, inference API/endpoints, third-party inference providers, Spaces demos or others), input and output data may be processed or handled differently by different providers or space owners. Please make sure you understand and agree with how your data is handled before using the model.

This is a small model intended for speculative decoding so the performance on DNA tasks is limited.

License#

Apache 2.0.

Acknowledgements#

Carbon is a joint collaboration between the research teams at Hugging Face, Zhongguancun Academy, and TIGEM/University of Naples “Federico II”.

Citation#

@article{allal2026carbon,
  title={Carbon: Decoding the Language of Life},
  author={Allal, Loubna Ben and Li, Qiuyi and Fiusco, Maurizio and Tunstall, Lewis and Rasul, Kashif and Beeching, Ed and Aubakirova, Dana and Pati{\~n}o, Carlos and Frere, Thibaud and Lozhkov, Anton and others},
  journal={bioRxiv},
  pages={2026--05},
  year={2026},
  publisher={Cold Spring Harbor Laboratory}
}

Files

11 files · 1.03 GBWeights 1.02 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 11 files with their sha256
FileSizesha256
.gitattributes1.64 KBbf4cac81acdfec99b400348f1cefde98a3388d798d18f371d19579df0b13ce31
README.md8.12 KB7a962bc7a8a65126a06676610181f64f7bce973bf4f9777f52aeda42fd8c105f
added_tokens.json707 Bc0284b582e14987fbd3d5a2cb2bd139084371ed9acbae488829a1c900833c680
config.json668 Be2bdf330ba0c2c2427c82d4982941b5081eeb032d8a90420ff2f9f5c38094ef4
dna_config.json160 B5aa3c13df5452264fdc6140b5a4b4f9dc35c1b81bd168bc84223bd610f165a7e
figures/carbon-500m-banner.png1.28 MBa8aa08faa761404a97eee785f92fa751be8a6e76de10fc7d891d1f8fcb7b8152
generation_config.json115 B269049836d11c5e25b7f206da818ba5d9a2ba2bda4041fb66bac46a3e36dfbca
model.safetensors1.02 GBe257506988203fdb8bb46976ee81c97e24f29073754bbff70137c7704dbadaa8
special_tokens_map.json616 B6676f091c8bc4d1b50146427cfde92073402866b87b6e39223227931b70083e9
tokenizer.py26.6 KBe84af29f2eb2b64d9faa3643d85b15278698c2c5bdc8f301347b2a82151508b7
tokenizer_config.json5.54 KBf0ebf75e73c89e3131331cdd41e04436e8fc0c3e33d1020e191ad746c07e2479
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
2ac078d4dd pinned now2026-11-15 03:33 UTC11 files · 1.03 GB

Use it

$ fw get HuggingFaceBio/Carbon-500M
# manifest sha256 c1e0e9a0e2bb… · 1.03 GB · 11 files
$ fw verify ./Carbon-500M HuggingFaceBio/Carbon-500M
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/HuggingFaceBio/Carbon-500M.json --dir ./Carbon-500M $ python3 fw.py verify ./Carbon-500M ./HuggingFaceBio__Carbon-500M.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download HuggingFaceBio/Carbon-500M --revision 2ac078d4dd6c79b5c1255b24b5c64a1982d97c74 --local-dir ./Carbon-500M
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModelForCausalLM, AutoTokenizer tok = AutoTokenizer.from_pretrained("HuggingFaceBio/Carbon-500M", revision="2ac078d4dd6c79b5c1255b24b5c64a1982d97c74") model = AutoModelForCausalLM.from_pretrained("HuggingFaceBio/Carbon-500M", revision="2ac078d4dd6c79b5c1255b24b5c64a1982d97c74", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve HuggingFaceBio/Carbon-500M --revision 2ac078d4dd6c79b5c1255b24b5c64a1982d97c74

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
7a962bc7a8a65126a06676610181f64f7bce973bf4f9777f52aeda42fd8c105f
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: HuggingFaceBio <huggingface.co/HuggingFaceBio>Newsgroups: alt.freeweights.textSubject: Carbon-500MDate: 2026-11-15Commit: 2ac078dSigned: 2DC28CC7B26A283B ✓
Upstream
HuggingFaceBio/Carbon-500M
Pinned commit
2ac078d4dd6c79b5c1255b24b5c64a1982d97c74
Manifest
Carbon-500M.json · .minisig
Manifest sha256
c1e0e9a0e2bb3fcc34711a67cbddbbf7e24e0c78da5a42636af6f92e0732ec9c
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:33 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/HuggingFaceBio/Carbon-500M.json $ curl -O https://freeweights.allternit.com/manifests/HuggingFaceBio/Carbon-500M.json.minisig $ minisign -Vm Carbon-500M.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

1 model in the catalog name this one as their parent.

Quantizations
1
Quantizations 1
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download HuggingFaceBio/Carbon-500M
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. Carbon-500M.json. Provenance. Takedown history: none.

Variants

1 quantized or adapter build of Carbon-500M. Each has its own license check and page.

From: laion <huggingface.co/laion>Subject: a2-rl-e2egit_large-50-32B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-large-15-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-v2-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_pymethods2test-large-80-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_unitsyn-python-large-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_mix_h2_language_proportional-65-8B