Audio-Text-to-Text
Transformers
Safetensors
midashenglm_spatial
text-generation
spatial-audio-understanding
multimodal
audio-language-model
audio
dasheng
custom_code
Instructions to use mispeech/midashenglm-spatial with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mispeech/midashenglm-spatial with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("mispeech/midashenglm-spatial", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from mispeech/midashenglm-spatial: direct link, hf CLI and curl.
- Browser
- Download file 4.54 kB
-
https://huggingface.co/mispeech/midashenglm-spatial/resolve/main/config.json
- Command line
-
hf download hf://mispeech/midashenglm-spatial/config.json
-
curl -L -o config.json https://huggingface.co/mispeech/midashenglm-spatial/resolve/main/config.json
4.54 kB
| { | |
| "architectures": [ | |
| "MiDashengLMSpatialModel" | |
| ], | |
| "model_type": "midashenglm_spatial", | |
| "auto_map": { | |
| "AutoConfig": "configuration_midashenglm_spatial.MiDashengLMSpatialConfig", | |
| "AutoModelForCausalLM": "modeling_midashenglm_spatial.MiDashengLMSpatialModel" | |
| }, | |
| "audio_encoder_config": { | |
| "embed_dim": 1280, | |
| "depth": 32, | |
| "num_heads": 16, | |
| "input_channels": 1, | |
| "outputdim": 527, | |
| "patch_size": [ | |
| 64, | |
| 4 | |
| ], | |
| "patch_stride": [ | |
| 64, | |
| 4 | |
| ], | |
| "target_length": 1008, | |
| "pooling": null, | |
| "eval_avg": "cat", | |
| "init_bn": false, | |
| "n_mels": 64, | |
| "n_fft": 512, | |
| "hop_size": 160, | |
| "win_size": 512, | |
| "f_min": 0.0, | |
| "f_max": 8000.0, | |
| "sample_rate": 16000, | |
| "center": true | |
| }, | |
| "spatial_audio_encoder_config": { | |
| "embed_dim": 768, | |
| "depth": 12, | |
| "num_heads": 12, | |
| "input_channels": 1, | |
| "outputdim": 527, | |
| "patch_size": [ | |
| 64, | |
| 4 | |
| ], | |
| "patch_stride": [ | |
| 64, | |
| 4 | |
| ], | |
| "target_length": 1008, | |
| "pooling": null, | |
| "eval_avg": "cat", | |
| "init_bn": false, | |
| "n_mels": 64, | |
| "n_fft": 512, | |
| "hop_size": 160, | |
| "win_size": 512, | |
| "f_min": 0.0, | |
| "f_max": 8000.0, | |
| "sample_rate": 16000, | |
| "center": true | |
| }, | |
| "text_config": { | |
| "return_dict": true, | |
| "output_hidden_states": false, | |
| "torchscript": false, | |
| "dtype": "float32", | |
| "pruned_heads": {}, | |
| "tie_word_embeddings": false, | |
| "chunk_size_feed_forward": 0, | |
| "is_encoder_decoder": false, | |
| "is_decoder": false, | |
| "cross_attention_hidden_size": null, | |
| "add_cross_attention": false, | |
| "tie_encoder_decoder": false, | |
| "finetuning_task": null, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "task_specific_params": null, | |
| "problem_type": null, | |
| "tokenizer_class": null, | |
| "prefix": null, | |
| "bos_token_id": null, | |
| "pad_token_id": null, | |
| "eos_token_id": null, | |
| "sep_token_id": null, | |
| "decoder_start_token_id": null, | |
| "max_length": 20, | |
| "min_length": 0, | |
| "do_sample": false, | |
| "early_stopping": false, | |
| "num_beams": 1, | |
| "temperature": 1.0, | |
| "top_k": 50, | |
| "top_p": 1.0, | |
| "typical_p": 1.0, | |
| "repetition_penalty": 1.0, | |
| "length_penalty": 1.0, | |
| "no_repeat_ngram_size": 0, | |
| "encoder_no_repeat_ngram_size": 0, | |
| "bad_words_ids": null, | |
| "num_return_sequences": 1, | |
| "output_scores": false, | |
| "return_dict_in_generate": false, | |
| "forced_bos_token_id": null, | |
| "forced_eos_token_id": null, | |
| "remove_invalid_values": false, | |
| "exponential_decay_length_penalty": null, | |
| "suppress_tokens": null, | |
| "begin_suppress_tokens": null, | |
| "num_beam_groups": 1, | |
| "diversity_penalty": 0.0, | |
| "transformers_version": "4.57.6", | |
| "model_type": "qwen2_5_omni_text", | |
| "init_std": 0.02, | |
| "tf_legacy_loss": false, | |
| "use_bfloat16": false, | |
| "vocab_size": 152064, | |
| "max_position_embeddings": 32768, | |
| "hidden_size": 3584, | |
| "intermediate_size": 18944, | |
| "num_hidden_layers": 28, | |
| "num_attention_heads": 28, | |
| "use_sliding_window": false, | |
| "sliding_window": null, | |
| "max_window_layers": 28, | |
| "num_key_value_heads": 4, | |
| "hidden_act": "silu", | |
| "initializer_range": 0.02, | |
| "rms_norm_eps": 1e-06, | |
| "use_cache": true, | |
| "rope_theta": 1000000.0, | |
| "rope_scaling": { | |
| "mrope_section": [ | |
| 16, | |
| 24, | |
| 24 | |
| ], | |
| "rope_type": "default", | |
| "type": "default" | |
| }, | |
| "attention_dropout": 0.0, | |
| "layer_types": [ | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention" | |
| ], | |
| "output_attentions": false | |
| }, | |
| "subsample_factor": 5, | |
| "audio_channels": 2, | |
| "num_fusions": 4, | |
| "audio_token_id": 151646, | |
| "sem_feature": "MonoLogMel", | |
| "spa_feature": "LogMel", | |
| "min_audio_duration": 0.2, | |
| "model_class": "SpatialMiAudioLLM", | |
| "torch_dtype": "float32" | |
| } |