alt.freeweights.text / Emu3-Gen-hf
From: BAAI <huggingface.co/BAAI>Newsgroups: alt.freeweights.textSubject:

Emu3-Gen-hf

Date: 2026-11-15Commit: 062069aSigned: 2DC28CC7B26A283B ✓

Image text to text model with 8.8B parameters. Safetensors weights, 35.1 GB in all. Published by BAAI under Apache-2.0.

8.8B params35.1GBEmu3-Gen-hfsafetensorspermissive
FactsParams8.8BSize35.1 GBFormatssafetensorsTaskimage text to textLicenseApache-2.0From sourcepermissive
$ fw get BAAI/Emu3-Gen-hf
# manifest sha256 01ff95929e22… · 35.1 GB · 22 files
$ fw verify ./Emu3-Gen-hf BAAI/Emu3-Gen-hf
From sourceHosted (signed)BAAI/Emu3-Gen-hfLast check: 2026-11-15 03:55 UTC

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

Works with

Overview

Size
35.1 GB
Weights
35.1 GB (safetensors)
Parameters
8.8B
Formats
safetensors
Task
image text to text
License
Apache-2.0 (permissive)
Files
22, each with a sha256
Publisher
BAAI
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:55 UTCpassed

Model card

From the publisher at commit 062069a. Shown as plain text with links; images open at the publisher.

Emu3: Next-Token Prediction is All You Need#

Emu3 Team, BAAI

Image: arch.

Below is the model card of Emu3-Chat model, which is adapted from the original Emu3 model card that you can find here.

Model details#

Model type: Emu3 is an open-source multimodal models trained with next-token prediction task. By tokenizing images and text into a discrete space, Emu3 is trained as a single transformer from scratch on a mixture of multimodal sequences. It is an auto-regressive language model, based on the transformer architecture.

Paper or resources for more information: https://github.com/baaivision/Emu3

Highlights#

  • Emu3 is capable of generating high-quality images following the text input, by simply predicting the next vision token. The model naturally supports flexible resolutions and styles.
  • Emu3 shows strong vision-language understanding capabilities to see the physical world and provides coherent text responses. Notably, this capability is achieved without depending on a CLIP and a pretrained LLM.
  • Emu3 simply generates a video causally by predicting the next token in a video sequence, unlike the video diffusion model as in Sora. With a video in context, Emu3 can also naturally extend the video and predict what will happen next.
  • Emu3 outperforms several well-established task-specific models in both generation and perception tasks, surpassing flagship open models such as SDXL, LLaVA-1.6 and OpenSora-1.2, while eliminating the need for diffusion or compositional architectures.

How to use the model#

First, make sure to have transformers >= 4.48.0. Below is an example script to run generation in float16 precision on a GPU device:

import requests
from PIL import Image

import torch
from transformers import AutoProcessor, Emu3ForConditionalGeneration

model_id = "BAAI/Emu3-Gen-hf"
model = Emu3ForConditionalGeneration.from_pretrained(
    model_id, 
    torch_dtype=torch.float16, 
    low_cpu_mem_usage=True,
    device_map="cuda:0",
)

processor = AutoProcessor.from_pretrained(model_id)
inputs = processor(
    text=["a portrait of young girl. masterpiece, film grained, best quality."],
    padding=True,
    return_tensors="pt",
    return_for_image_generation=True,
).to(model.device)

image_sizes = inputs.pop("image_sizes")
HEIGHT, WIDTH = image_sizes[0]
VISUAL_TOKENS = model.vocabulary_mapping.image_tokens

def prefix_allowed_tokens_fn(batch_id, input_ids):
    height, width = HEIGHT, WIDTH
    visual_tokens = VISUAL_TOKENS
    image_wrapper_token_id = torch.tensor([processor.tokenizer.image_wrapper_token_id], device=model.device)
    eoi_token_id = torch.tensor([processor.tokenizer.eoi_token_id], device=model.device)
    eos_token_id = torch.tensor([processor.tokenizer.eos_token_id], device=model.device)
    pad_token_id = torch.tensor([processor.tokenizer.pad_token_id], device=model.device)
    eof_token_id = torch.tensor([processor.tokenizer.eof_token_id], device=model.device)
    eol_token_id = processor.tokenizer.encode("<|extra_200|>", return_tensors="pt")[0]

    position = torch.nonzero(input_ids == image_wrapper_token_id, as_tuple=True)[0][0]
    offset = input_ids.shape[0] - position
    if offset % (width + 1) == 0:
        return (eol_token_id,)
    elif offset == (width + 1) * height + 1:
        return (eof_token_id,)
    elif offset == (width + 1) * height + 2:
        return (eoi_token_id,)
    elif offset == (width + 1) * height + 3:
        return (eos_token_id,)
    elif offset > (width + 1) * height + 3:
        return (pad_token_id,)
    else:
        return visual_tokens

out = model.generate(
    **inputs,
    max_new_tokens=9_000,
    prefix_allowed_tokens_fn=prefix_allowed_tokens_fn,
    do_sample=True,
)

image = model.decode_image_tokens(out.sequences[:, inputs.input_ids.shape[1]: ], height=HEIGHT, width=WIDTH)
images = processor.postprocess(list(image.float()), return_tensors="PIL.Image.Image")
for i, image in enumerate(images['pixel_values']):
    image.save(f"result{i}.png")
  
Model optimization#
Use Flash-Attention 2 to further speed-up generation#

First make sure to install flash-attn. Refer to the original repository of Flash Attention regarding that package installation. Simply change the snippet above with:

model = Emu3ForConditionalGeneration.from_pretrained(
    model_id, 
    torch_dtype=torch.float16, 
    low_cpu_mem_usage=True,
+   attn_implementation="flash_attention_2",
    device_map="cuda:0",
)

Citation#

@misc{wang2024emu3nexttokenpredictionneed,
      title={Emu3: Next-Token Prediction is All You Need}, 
      author={Xinlong Wang and Xiaosong Zhang and Zhengxiong Luo and Quan Sun and Yufeng Cui and Jinsheng Wang and Fan Zhang and Yueze Wang and Zhen Li and Qiying Yu and Yingli Zhao and Yulong Ao and Xuebin Min and Tao Li and Boya Wu and Bo Zhao and Bowen Zhang and Liangdong Wang and Guang Liu and Zheqi He and Xi Yang and Jingjing Liu and Yonghua Lin and Tiejun Huang and Zhongyuan Wang},
      year={2024},
      eprint={2409.18869},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2409.18869}, 
}

Files

22 files · 35.1 GBWeights 35.1 GB (safetensors). Sizes and sha256 from the signed manifest.
Show all 22 files with their sha256
FileSizesha256
.gitattributes1.57 KB34448b82c17d60fec9b65b1f093c115ddbaadc04beb1b0140b6bfed2e012a930
README.md5.66 KB4b0f136ac56d75e9a3c6356509001e4bc5569b073edde169c934e4481c754d7e
chat_template.jinja673 B2e394533fbf721e6e6223243f2df4145b8db5ab2870af9dca2445648db25d541
chat_template.json699 Bb9ec12b63e10f0c7f7132f6e7abe2d8ec9c3df6a0faa97a745480ae731416d85
config.json6.55 MB8d30a03f3ebd6846dcac011cf05a78490570ef57b35162a5257718939ad0c42b
generation_config.json161 B31a8dd5f7ff3babcda06b5bd1e4b7613096499f2e8beb44fa5197cfe25dde5c6
merges.txt1.67 MB8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5
model-00001-of-00008.safetensors4.94 GB482870907a43f7cfd0240579049f12bbe848bd3ba8e346f6ebb61b25ef76f674
model-00002-of-00008.safetensors4.83 GBe3eaf1793568ff5929b99236951e71b9a624f6c734c6104ca13d15c07aba09b9
model-00003-of-00008.safetensors5.00 GBf688ebc58dfc2ac385e4d6b87e38dda253dff9fe23c8c8b4811d3117fca5ac8f
model-00004-of-00008.safetensors5.00 GB30fde22981ba7d706f86478f3f32a33d9bd63ec7e168d02860eaeddcb5735744
model-00005-of-00008.safetensors4.83 GB00af28b0448f30c29138311dfb41a3d9a607907f91f2346a45fa8315174d9439
model-00006-of-00008.safetensors5.00 GBee40365b2724ad5b05536fc60d0ab93f71fdfc5e1ee74380f1078d76c1cff013
model-00007-of-00008.safetensors2.43 GB87cbb81f894dc637e50f1eb44c710b406eef97a3f29b55be8d361c56369ea4af
model-00008-of-00008.safetensors3.02 GBc0b38d7edfa038674a74e612fe1e5df526b9845ace7efa38e92ef9033f03acee
model.safetensors.index.json77.7 KB39dfa249c284d3231ee07587eb94c346bbf4f186f69a62fc7c70a18ea9ae128f
preprocessor_config.json611 B031408d84864d4f797adf24472c445d8fedebb8a95bc92344a6711a28aff2977
processor_config.json69 B9d13e0c50db133e9faa5d58f87f973a63efac0eeeeb591e46185a0ee90c8ab00
special_tokens_map.json643 Bd1ba74550498b07dceb8393b56a44f74c4a8aa55e53701fa28501688c2eb9b3f
tokenizer.json19.4 MBc37805242c128a8cef44a0eb543fe94a6e6b0b82ff10588da527893171ae7cff
tokenizer_config.json6.26 MBaeafa483ba2596acfea4c944db208c366f2e2a797e5c5021ab5a7b93ddc3fec8
vocab.json3.86 MB1d01d21a55f610550f3d170d0fe5725dfd2170acf5dccbf72ef4c284a515b090
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
062069a330 pinned now2026-11-15 03:55 UTC22 files · 35.1 GB

Use it

$ fw get BAAI/Emu3-Gen-hf
# manifest sha256 01ff95929e22… · 35.1 GB · 22 files
$ fw verify ./Emu3-Gen-hf BAAI/Emu3-Gen-hf
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/BAAI/Emu3-Gen-hf.json --dir ./Emu3-Gen-hf $ python3 fw.py verify ./Emu3-Gen-hf ./BAAI__Emu3-Gen-hf.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download BAAI/Emu3-Gen-hf --revision 062069a3301d7c62c6c93a55c9722efb9321f5f3 --local-dir ./Emu3-Gen-hf
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModelForImageTextToText, AutoProcessor processor = AutoProcessor.from_pretrained("BAAI/Emu3-Gen-hf", revision="062069a3301d7c62c6c93a55c9722efb9321f5f3") model = AutoModelForImageTextToText.from_pretrained("BAAI/Emu3-Gen-hf", revision="062069a3301d7c62c6c93a55c9722efb9321f5f3", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve BAAI/Emu3-Gen-hf --revision 062069a3301d7c62c6c93a55c9722efb9321f5f3

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
4b0f136ac56d75e9a3c6356509001e4bc5569b073edde169c934e4481c754d7e
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: BAAI <huggingface.co/BAAI>Newsgroups: alt.freeweights.textSubject: Emu3-Gen-hfDate: 2026-11-15Commit: 062069aSigned: 2DC28CC7B26A283B ✓
Upstream
BAAI/Emu3-Gen-hf
Pinned commit
062069a3301d7c62c6c93a55c9722efb9321f5f3
Manifest
Emu3-Gen-hf.json · .minisig
Manifest sha256
01ff95929e225e023a53bece6cb9a6cf186a328cc70341aabedaffcfaeb32fb0
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:55 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/BAAI/Emu3-Gen-hf.json $ curl -O https://freeweights.allternit.com/manifests/BAAI/Emu3-Gen-hf.json.minisig $ minisign -Vm Emu3-Gen-hf.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

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download BAAI/Emu3-Gen-hf
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. Emu3-Gen-hf.json. Provenance. Takedown history: none.
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