---
title: LongCat-Next-int4-AutoRound
canonical_url: "https://www.modelscope.cn/models/INC4AI/LongCat-Next-int4-AutoRound"
md_url: "https://www.modelscope.cn/models/INC4AI/LongCat-Next-int4-AutoRound.md"
repository: INC4AI/LongCat-Next-int4-AutoRound
last_updated: 2026-04-13
pipeline_tag: any-to-any
tasks:
  - any-to-any
model_type:
  - longcat_next
architectures:
  - LongcatNextForCausalLM
base_model:
  - meituan-longcat/LongCat-Next
base_model_relation: quantized
parameters: 43.7B
tensor_type:
  - F32
  - BF16
  - I32
  - F16
library_name:
  - pytorch
  - transformer
  - safetensors
frameworks:
  - pytorch
downloads: 32
stars: 0
---

# LongCat-Next-int4-AutoRound

> LongCat-Next-int4-AutoRound - INC4AI 在 ModelScope 开源的模型。This model is an int4 model with groupsize 128 and symmetric quantization of meituan-longcat/LongCat-Next generated by intel/auto-round. Please follow the license of the original model.

INC4AI/LongCat-Next-int4-AutoRound 是 ModelScope 魔搭社区上的 43.7B 参数any-to-any模型，基于 meituan-longcat/LongCat-Next 构建。

- **Repository**: INC4AI/LongCat-Next-int4-AutoRound
- **Tasks**: any-to-any
- **Parameters**: 43.7B
- **Base model**: meituan-longcat/LongCat-Next
- **Downloads**: 32
- **Stars**: 0
- **Last updated**: 2026-04-13

Source: https://www.modelscope.cn/models/INC4AI/LongCat-Next-int4-AutoRound

---

## Model Details

This model is an int4 model with group_size 128 and symmetric quantization of [meituan-longcat/LongCat-Next](https://huggingface.co/meituan-longcat/LongCat-Next) generated by [intel/auto-round](https://github.com/intel/auto-round). Please follow the license of the original model.

## How to Use

### HF Usage

- Remember to modify WEIGHT_PATH_TO_LONGCAT_NEXT in ./config.json, because decoders use lazy loading.
- assets/cosy24k_ocoder/image_decoder/nmm_infer can be obtained from https://huggingface.co/meituan-longcat/LongCat-Next/tree/main

```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, AutoProcessor

# Load model
model_name = "Intel/LongCat-Next-int4-AutoRound"
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True,
)
model.eval()

tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True, fix_mistral_regex=True)
model.text_tokenizer = tokenizer # Dynamic binding
processor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)

# Set messages
messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "What book is this?<longcat_img_start>./assets/book.png<longcat_img_end>"}
]

# Apply chat-template
text_input = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
)
print(f"{text_input=}")

# Preprocessing
text_inputs, visual_inputs, audio_inputs = processor(text=text_input, return_tensors="pt")
text_inputs = text_inputs.to(model.device)
if visual_inputs is not None:
    visual_inputs = visual_inputs.to(model.device)
if audio_inputs is not None:
    audio_inputs = audio_inputs.to(model.device)

# AR
with torch.no_grad():
    outputs = model.generate(
        input_ids=text_inputs["input_ids"],
        visual_inputs=visual_inputs,
        audio_inputs=audio_inputs,
        return_dict_in_generate=True,
    )

# Text decoding
output_input_ids = outputs.sequences
text_output = tokenizer.decode(output_input_ids[0][len(text_inputs["input_ids"][0]):], skip_special_tokens=True)
print(f"{text_output=}")

# Images decoding
output_visual_ids = outputs.visual_ids
if output_visual_ids.size(0) > 0:
    image_path_list = model.model.decode_visual_ids_and_save(
        output_visual_ids,
        save_prefix="./output_image",
        **model.generation_config.visual_generation_config["custom_params"],
    )
    print(f"{image_path_list=}")

# Audio decoding
output_audio_text_ids = outputs.audio_text_ids
output_audio_ids = outputs.audio_ids
if output_audio_text_ids.size(-1) > 0:
    audio_text = tokenizer.decode(output_audio_text_ids[0], skip_special_tokens=True)
    print(f"{audio_text=}")
if output_audio_ids.size(0) > 0:
    audio_path_list = model.model.decode_audio_ids_and_save(
        output_audio_ids,
        save_prefix="./output_audio",
        **model.generation_config.audio_generation_config["custom_params"],
    )
    print(f"{audio_path_list=}")
```

## Generate the Model

```bash
# Need https://github.com/intel/auto-round/pull/1637
AR_CALIB_FORCE_CUDA=1 auto-round --bits 4 --iters 200 --model_name meituan-longcat/LongCat-Next
```

## Ethical Considerations and Limitations

The model can produce factually incorrect output, and should not be relied on to produce factually accurate information. Because of the limitations of the pretrained model and the finetuning datasets, it is possible that this model could generate lewd, biased or otherwise offensive outputs.

Therefore, before deploying any applications of the model, developers should perform safety testing.

## Caveats and Recommendations

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.

Here are a couple of useful links to learn more about Intel's AI software:

- [Intel Neural Compressor](https://github.com/intel/neural-compressor)

## Disclaimer

The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please consult an attorney before using this model for commercial purposes.

## Cite

```
@article{cheng2023optimize, title={Optimize weight rounding via signed gradient descent for the quantization of llms}, author={Cheng, Wenhua and Zhang, Weiwei and Shen, Haihao and Cai, Yiyang and He, Xin and Lv, Kaokao and Liu, Yi}, journal={arXiv preprint arXiv:2309.05516}, year={2023} }
```

[arxiv](https://arxiv.org/abs/2309.05516) [github](https://github.com/intel/auto-round)
