Instructions to use afanasjev/Hy-MT3-7B-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use afanasjev/Hy-MT3-7B-NVFP4 with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("translation", model="afanasjev/Hy-MT3-7B-NVFP4")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("afanasjev/Hy-MT3-7B-NVFP4") model = AutoModelForCausalLM.from_pretrained("afanasjev/Hy-MT3-7B-NVFP4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Hy-MT3-7B-NVFP4
This is a calibrated NVFP4 (W4A4 โ E2M1 weights & activations with E4M3 micro-block scales) quantized checkpoint of tencent/Hy-MT3-7B, the third-generation Tencent Hy multilingual translation model (102 languages). It is built with llm-compressor in the compressed-tensors format for NVIDIA Blackwell GPUs (DGX Spark GB10, RTX 5090, B200).
Quantization Details
- Base Model:
tencent/Hy-MT3-7B(7B parameters,hunyuan_v1_dense (dense)architecture) - Method: NVFP4 (
W4A4, group size 16, FP8 micro-block scales) viallmcompressor; activation scales are calibrated, so the checkpoint is not data-free - Ignored Layers:
lm_headkept in original precision - Calibration Dataset: 6144 multilingual sentence pairs, each a translation prompt plus its reference translation (Helsinki-NLP/opus-100 [train] ยท 12 pairs / 24 directions,
max_seq_length=2048, packed) - Runtime requirement:
transformers>=5.6.0for nativehunyuan_v1_densesupport
Calibration uses parallel sentences rendered as complete exchanges in the model's own chat format (the translation instruction followed by the reference translation as the assistant turn) across Germanic, Romance, Slavic and Turkic languages, CJK, Arabic, Devanagari, Thai and Vietnamese, so the quantized statistics cover both reading a request and writing the translation, in the scripts this model is actually used on.
Deployment with vLLM (DGX Spark / GB10)
export CUTE_DSL_ARCH=sm_121a
vllm serve afanasjev/Hy-MT3-7B-NVFP4 \
--tensor-parallel-size=1 \
--host=0.0.0.0 \
--port=8000 \
--dtype=bfloat16 \
--max-model-len=32768 \
--served-model-name=hy-mt3-7b \
--gpu-memory-utilization=0.25 \
-O2 \
--max-num-seqs=64 \
--max-num-batched-tokens=32768 \
--enable-chunked-prefill \
--safetensors-load-strategy=prefetch \
--enable-prefix-caching \
--async-scheduling \
--quantization=compressed-tensors \
--kv-cache-dtype=fp8 \
--trust-remote-code
Reproduce
hy-quant convert hy-mt3-7b --scheme nvfp4
License
Inherits the apache-2.0 license from tencent/Hy-MT3-7B.
- Downloads last month
- 69
Model tree for afanasjev/Hy-MT3-7B-NVFP4
Base model
tencent/Hy-MT3-7B