Zum Inhalt springen
ModelAufgelistetExtern
Browse files

Midashenglm 7b 1021 W4a16 Gptq

The 4bit (w4a16) weights for mispeech/midashenglm-7b-1021-fp32, quantized by GPTQ.

ArtOtherBasismodellQwen/Qwen2.5-Omni-7BVersionRevision 0a7d437BBewertung

Modellquelle

Art
Other
Dateigröße
1,75–4,65 GB
Basismodell
Qwen/Qwen2.5-Omni-7B
Version
vRevision 0a7d437
Aktualisiert
26. Okt. 2026
Downloads
34
Quelle
Hugging Face

Quellenbeschreibung

MiDashengLM-7B-1021 (4bit, GPTQ quantized)

The 4bit (w4a16) weights for mispeech/midashenglm-7b-1021-fp32, quantized by GPTQ.

An ideal choice for resource-constrained environments. It offers broad GPU compatibility and a smaller memory footprint, making it suitable for deployment where VRAM, memory, or storage is limited, provided that a slight trade-off in quality is acceptable.

Usage

Load Model

from transformers import AutoModelForCausalLM, AutoProcessor, AutoTokenizer

model_id = "mispeech/midashenglm-7b-1021-w4a16-gptq"
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(model_id)
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)

Construct Prompt

user_prompt = "Caption the audio."  # You may try any other prompt

messages = [
    {
        "role": "user",
        "content": [
            {"type": "text", "text": user_prompt},
            {
                "type": "audio",
                "path": "/path/to/example.wav",
                # or "url": "https://example.com/example.wav"
                # or "audio": np.random.randn(16000)
            },
        ],
    },
]

Generate Output

import torch

with torch.no_grad():
    model_inputs = processor.apply_chat_template(
        messages,
        tokenize=True,
        add_generation_prompt=True,
        add_special_tokens=True,
        return_dict=True,
    ).to(device=model.device, dtype=model.dtype)
    generation = model.generate(**model_inputs)
    output = tokenizer.batch_decode(generation, skip_special_tokens=True)  # ["An engine is idling."]

Citation

MiDashengLM is under the Apache License 2.0, and we encourage its use in both research and business applications.

If you find MiDashengLM useful in your research, please consider citing our work:

@techreport{midashenglm7b,
  title      = {MiDashengLM: Efficient Audio Understanding with General Audio Captions},
  author     = {{Horizon Team, MiLM Plus}},
  institution= {Xiaomi Inc.},
  year       = {2025},
  note       = {Contributors: Heinrich Dinkel et al. (listed alphabetically in Appendix B)},
  url        = {https://arxiv.org/abs/2508.03983},
  eprint     = {2508.03983},
}

Quellen

1 Quelle
Hugging FacePrimärVersion 0a7d4377da6a4f279e31f483c14eba987de4a42c
huggingface.co/mispeech/midashenglm-7b-1021-w4a16-gptq/tree/0a7d4377da6a4f279e31f483c14eba987de4a42c

Verifiziert 25. Okt.

Download files

Modellartefakte

2 Artefakte

model-00001-of-00002.safetensors

safetensors · 4,65 GB · SHA-256 5313e1cc4eb9…a63a · Hugging Face

Download shard

model-00002-of-00002.safetensors

safetensors · 1,75 GB · SHA-256 b43510361faf…d6f5 · Hugging Face

Download shard

Quellenauszüge

3 Auszüge

--- license: apache-2.0 language: - en - zh - th - id - vi pipeline_tag: audio-text-to-text tags: - multimodal - audio-language-model - audio base_model: - mispeech/dasheng-0.6B - Qwen/Qwen2.5-Omni-7B base_model_relation: finetune --- # MiDashengLM-7B-1021 (4bit, GPTQ quantized) The 4bit (w4a16) weights for [mispeech/midashenglm-7b-1021-fp32](https://huggingface.co/mispeech/midashenglm-7b-1021-fp32), quantized by GPTQ. An ideal choice for resource-constrained environments. It offers broad GPU compatibility and a smaller memory footprint, making it suitable for deployment where VRAM, memory, or storage is limited, provided that a slight trade-off in quality is acceptable. ## Usage ### Load Model ```python from transformers import AutoModelForCausalLM, AutoProcessor, AutoTokenizer model_id = "mispeech/midashenglm-7b-1021-w4a16-gptq" model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True) tokenizer = AutoTokenizer.from_pretrained(model_id) processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True) ``` ### Construct Prompt ```python user_prompt = "Caption the audio." # You may try any other prompt messages = [ { "role": "user", "content": [ {"type": "text", "text": user_prompt}, { "type": "audio", "path": "/path/to/example.wav", # or "url": "https://example.com/example.wav" # or "audio": np.random.randn(16000) }, ], }, ] ``` ### Generate Output ```python import torch with torch.no_grad(): model_inputs = processor.apply_chat_template( messages, tokenize=True, add_generation_prompt=True, add_special_tokens=True, return_dict=True, ).to(device=model.device, dtype=model.dtype) generation = model.generate(**model_inputs) output = tokenizer.batch_decode(generation, skip_special_tokens=True) # ["An engine is idling."] ``` ## Citation MiDashengLM is under the Apache License 2.0, and we encourage its use in **both research and business applications**. If you find MiDashengLM useful in your research, please consider citing our work: ```bibtex @techreport{midashenglm7b, title = {MiDashengLM: Efficient Audio Understanding with General Audio Captions}, author = {{Horizon Team, MiLM Plus}}, institution= {Xiaomi Inc.}, year = {2025}, note = {Contributors: Heinrich Dinkel et al. (listed alphabetically in Appendix B)}, url = {https://arxiv.org/abs/2508.03983}, eprint = {2508.03983}, } ```

Source context: 34 downloads · 1 likes · Pipeline audio-text-to-text · Repo mispeech/midashenglm-7b-1021-w4a16-gptq

Source context: 12 downloads · 1 likes · Pipeline audio-text-to-text · Repo mispeech/midashenglm-7b-1021-w4a16-gptq