MistralMosaic-24B-v2-4bit

ๆ—ฅๆœฌ่ชž

A 4-bit version of MistralMosaic-24B-v2, quantized with bitsandbytes (NF4 with double quantization, bf16 compute). The model, its results and its limitations are described on that page; this page only covers what differs.

bf16 (MistralMosaic-24B-v2) this model
Weights on the GPU 63.0 GB 18.3 GB
Files (safetensors) 62.3 GB 18.1 GB
Loss per token, change from bf16 โ€” +0.0417
Same top-1 token as bf16 โ€” 91.5%
Generation speed (A100, tokens/s) 1.51 1.37

Loss and top-1 agreement were measured on 8 Wikipedia articles (4 English, 4 Japanese, 4,096 tokens each). After saving, the model was loaded again from the saved files and gave the same logits.

Usage

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

name = "Eureka-COM/MistralMosaic-24B-v2-4bit"
tok = AutoTokenizer.from_pretrained(name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(name, trust_remote_code=True, device_map="cuda")
ids = tok("The capital of Japan is", return_tensors="pt").input_ids.to(model.device)
out = model.generate(ids, max_new_tokens=32, do_sample=False)
print(tok.decode(out[0]))

Requirements: bitsandbytes (built with 0.50.2) and a CUDA GPU, plus what MistralMosaic-24B-v2 needs. Do not pass fix_mistral_regex (see the main page).

License and sources

Apache-2.0 (LICENSE, NOTICE); see MistralMosaic-24B-v2 for the base weights, the official code and the data. Every number here was copied by a script from the measured result files; evidence.json lists each value and its file.

Downloads last month
15
Safetensors
Model size
31B params
Tensor type
F32
ยท
BF16
ยท
U8
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Eureka-COM/MistralMosaic-24B-v2-4bit

Quantized
(3)
this model