Upload folder using huggingface_hub
Browse filesFiles changed (14)
- .gitattributes+1
- BiCodec/config.yamlAdded+60
- BiCodec/model.safetensorsAdded+3
- LLM/chat_template.jinjaAdded+54
- LLM/config.jsonAdded+57
- LLM/generation_config.jsonAdded+7
- LLM/model.safetensorsAdded+3
- LLM/tokenizer.jsonAdded+3
- LLM/tokenizer_config.jsonAdded+15
- config.yamlAdded+7
- wav2vec2-large-xlsr-53/README.mdAdded+29
- wav2vec2-large-xlsr-53/config.jsonAdded+83
- wav2vec2-large-xlsr-53/preprocessor_config.jsonAdded+9
- wav2vec2-large-xlsr-53/pytorch_model.binAdded+3
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines3334353632 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textLLM/tokenizer.json filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960audio_tokenizer: mel_params: sample_rate: 16000 n_fft: 1024 win_length: 640 hop_length: 320 mel_fmin: 10 mel_fmax: null num_mels: 128
encoder: input_channels: 1024 vocos_dim: 384 vocos_intermediate_dim: 2048 vocos_num_layers: 12 out_channels: 1024 sample_ratios: [1,1]
decoder: input_channel: 1024 channels: 1536 rates: [8, 5, 4, 2] kernel_sizes: [16,11,8,4]
quantizer: input_dim: 1024 codebook_size: 8192 codebook_dim: 8 commitment: 0.25 codebook_loss_weight: 2.0 use_l2_normlize: True threshold_ema_dead_code: 0.2 speaker_encoder: input_dim: 128 out_dim: 1024 latent_dim: 128 token_num: 32 fsq_levels: [4, 4, 4, 4, 4, 4] fsq_num_quantizers: 1
prenet: input_channels: 1024 vocos_dim: 384 vocos_intermediate_dim: 2048 vocos_num_layers: 12 out_channels: 1024 condition_dim: 1024 sample_ratios: [1,1] use_tanh_at_final: False
postnet: input_channels: 1024 vocos_dim: 384 vocos_intermediate_dim: 2048 vocos_num_layers: 6 out_channels: 1024 use_tanh_at_final: False
123version https://git-lfs.github.com/spec/v1oid sha256:e9940cd48d4446e4340ced82d234bf5618350dd9f5db900ebe47a4fdb03867ecsize 625518756123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354{%- if tools %} {{- '<|im_start|>system\n' }} {%- if messages[0]['role'] == 'system' %} {{- messages[0]['content'] }} {%- else %} {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }} {%- endif %} {{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }} {%- for tool in tools %} {{- "\n" }} {{- tool | tojson }} {%- endfor %} {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}{%- else %} {%- if messages[0]['role'] == 'system' %} {{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }} {%- else %} {{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }} {%- endif %}{%- endif %}{%- for message in messages %} {%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %} {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }} {%- elif message.role == "assistant" %} {{- '<|im_start|>' + message.role }} {%- if message.content %} {{- '\n' + message.content }} {%- endif %} {%- for tool_call in message.tool_calls %} {%- if tool_call.function is defined %} {%- set tool_call = tool_call.function %} {%- endif %} {{- '\n<tool_call>\n{"name": "' }} {{- tool_call.name }} {{- '", "arguments": ' }} {{- tool_call.arguments | tojson }} {{- '}\n</tool_call>' }} {%- endfor %} {{- '<|im_end|>\n' }} {%- elif message.role == "tool" %} {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %} {{- '<|im_start|>user' }} {%- endif %} {{- '\n<tool_response>\n' }} {{- message.content }} {{- '\n</tool_response>' }} {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} {{- '<|im_end|>\n' }} {%- endif %} {%- endif %}{%- endfor %}{%- if add_generation_prompt %} {{- '<|im_start|>assistant\n' }}{%- endif %}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657{ "architectures": [ "Qwen2ForCausalLM" ], "attention_dropout": 0.0, "bos_token_id": 151643, "dtype": "bfloat16", "eos_token_id": 151645, "hidden_act": "silu", "hidden_size": 896, "initializer_range": 0.02, "intermediate_size": 4864, "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" ], "max_position_embeddings": 32768, "max_window_layers": 21, "model_type": "qwen2", "num_attention_heads": 14, "num_hidden_layers": 24, "num_key_value_heads": 2, "pad_token_id": null, "rms_norm_eps": 1e-06, "rope_parameters": { "rope_theta": 1000000.0, "rope_type": "default" }, "sliding_window": null, "tie_word_embeddings": true, "transformers_version": "5.5.0", "use_cache": true, "use_sliding_window": false, "vocab_size": 166000}1234567{ "_from_model_config": true, "bos_token_id": 151643, "eos_token_id": 151645, "transformers_version": "5.5.0", "use_cache": true}123version https://git-lfs.github.com/spec/v1oid sha256:ce511216f39a5a8db5ec681a9cb77270c22c4f93bcd1272134f9778a17344362size 1013300536123version https://git-lfs.github.com/spec/v1oid sha256:7d51e92eb11baba7aa5fd10dc443b1d9fbadb48baa8b6d54397c4aafe2d0c027size 14129168123456789101112131415{ "add_prefix_space": false, "backend": "tokenizers", "bos_token": null, "clean_up_tokenization_spaces": false, "eos_token": "<|im_end|>", "errors": "replace", "extra_special_tokens": [], "is_local": true, "model_max_length": 131072, "pad_token": "<|endoftext|>", "split_special_tokens": false, "tokenizer_class": "Qwen2Tokenizer", "unk_token": null}1234567highpass_cutoff_freq: 40sample_rate: 16000 segment_duration: 2.4 # (s)max_val_duration: 12 # (s)latent_hop_length: 320ref_segment_duration: 6volume_normalize: true1234567891011121314151617181920212223242526272829---language: multilingualdatasets:- common_voicetags:- speechlicense: apache-2.0---
# Wav2Vec2-XLSR-53
[Facebook's XLSR-Wav2Vec2](https://ai.facebook.com/blog/wav2vec-20-learning-the-structure-of-speech-from-raw-audio/)
The base model pretrained on 16kHz sampled speech audio. When using the model make sure that your speech input is also sampled at 16Khz. Note that this model should be fine-tuned on a downstream task, like Automatic Speech Recognition. Check out [this blog](https://huggingface.co/blog/fine-tune-wav2vec2-english) for more information.
[Paper](https://arxiv.org/abs/2006.13979)
Authors: Alexis Conneau, Alexei Baevski, Ronan Collobert, Abdelrahman Mohamed, Michael Auli
**Abstract**This paper presents XLSR which learns cross-lingual speech representations by pretraining a single model from the raw waveform of speech in multiple languages. We build on wav2vec 2.0 which is trained by solving a contrastive task over masked latent speech representations and jointly learns a quantization of the latents shared across languages. The resulting model is fine-tuned on labeled data and experiments show that cross-lingual pretraining significantly outperforms monolingual pretraining. On the CommonVoice benchmark, XLSR shows a relative phoneme error rate reduction of 72% compared to the best known results. On BABEL, our approach improves word error rate by 16% relative compared to a comparable system. Our approach enables a single multilingual speech recognition model which is competitive to strong individual models. Analysis shows that the latent discrete speech representations are shared across languages with increased sharing for related languages. We hope to catalyze research in low-resource speech understanding by releasing XLSR-53, a large model pretrained in 53 languages.
The original model can be found under https://github.com/pytorch/fairseq/tree/master/examples/wav2vec#wav2vec-20.
# Usage
See [this notebook](https://colab.research.google.com/github/patrickvonplaten/notebooks/blob/master/Fine_Tune_XLSR_Wav2Vec2_on_Turkish_ASR_with_%F0%9F%A4%97_Transformers.ipynb) for more information on how to fine-tune the model.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283{ "activation_dropout": 0.0, "apply_spec_augment": true, "architectures": [ "Wav2Vec2ForPreTraining" ], "attention_dropout": 0.1, "bos_token_id": 1, "codevector_dim": 768, "contrastive_logits_temperature": 0.1, "conv_bias": true, "conv_dim": [ 512, 512, 512, 512, 512, 512, 512 ], "conv_kernel": [ 10, 3, 3, 3, 3, 2, 2 ], "conv_stride": [ 5, 2, 2, 2, 2, 2, 2 ], "ctc_loss_reduction": "sum", "ctc_zero_infinity": false, "diversity_loss_weight": 0.1, "do_stable_layer_norm": true, "eos_token_id": 2, "feat_extract_activation": "gelu", "feat_extract_dropout": 0.0, "feat_extract_norm": "layer", "feat_proj_dropout": 0.1, "feat_quantizer_dropout": 0.0, "final_dropout": 0.0, "gradient_checkpointing": false, "hidden_act": "gelu", "hidden_dropout": 0.1, "hidden_size": 1024, "initializer_range": 0.02, "intermediate_size": 4096, "layer_norm_eps": 1e-05, "layerdrop": 0.1, "mask_channel_length": 10, "mask_channel_min_space": 1, "mask_channel_other": 0.0, "mask_channel_prob": 0.0, "mask_channel_selection": "static", "mask_feature_length": 10, "mask_feature_prob": 0.0, "mask_time_length": 10, "mask_time_min_space": 1, "mask_time_other": 0.0, "mask_time_prob": 0.075, "mask_time_selection": "static", "model_type": "wav2vec2", "num_attention_heads": 16, "num_codevector_groups": 2, "num_codevectors_per_group": 320, "num_conv_pos_embedding_groups": 16, "num_conv_pos_embeddings": 128, "num_feat_extract_layers": 7, "num_hidden_layers": 24, "num_negatives": 100, "pad_token_id": 0, "proj_codevector_dim": 768, "transformers_version": "4.7.0.dev0", "vocab_size": 32}123456789{ "do_normalize": true, "feature_extractor_type": "Wav2Vec2FeatureExtractor", "feature_size": 1, "padding_side": "right", "padding_value": 0, "return_attention_mask": true, "sampling_rate": 16000}123version https://git-lfs.github.com/spec/v1oid sha256:314340227371a608f71adcd5f0de5933824fe77e55822aa4b24dba9c1c364dcbsize 1269737156.gitattributes+1
BiCodec/config.yamlAdded+60
BiCodec/model.safetensorsAdded+3
LLM/chat_template.jinjaAdded+54
LLM/config.jsonAdded+57
LLM/generation_config.jsonAdded+7
LLM/model.safetensorsAdded+3
LLM/tokenizer.jsonAdded+3
LLM/tokenizer_config.jsonAdded+15
config.yamlAdded+7
wav2vec2-large-xlsr-53/README.mdAdded+29
wav2vec2-large-xlsr-53/config.jsonAdded+83
wav2vec2-large-xlsr-53/preprocessor_config.jsonAdded+9
wav2vec2-large-xlsr-53/pytorch_model.binAdded+3