Skip to content

Use official Chinese to boot under mac, but Chinese will not be recognized #160

@miaokaixii

Description

@miaokaixii

python s2s_pipeline.py
--local_mac_optimal_settings
--device mps
--stt_model_name large-v3
--language zh
--mlx_lm_model_name mlx-community/Meta-Llama-3.1-8B-Instruct-4bit \

I use this startup code, but I won't be recognized if I speak Chinese. The following is my terminal prompt


/opt/anaconda3/envs/yuyin/lib/python3.11/site-packages/df/io.py:9: UserWarning: torchaudio.backend.common.AudioMetaData has been moved to torchaudio.AudioMetaData. Please update the import path.
from torchaudio.backend.common import AudioMetaData
[nltk_data] Downloading package averaged_perceptron_tagger_eng to
[nltk_data] /Users/miaokaixi/nltk_data...
[nltk_data] Package averaged_perceptron_tagger_eng is already up-to-
[nltk_data] date!
Using cache found in /Users/miaokaixi/.cache/torch/hub/snakers4_silero-vad_master
2025-03-21 01:20:45,176 - STT.moonshine_handler - INFO - Warming up MoonshineSTTHandler
/opt/anaconda3/envs/yuyin/lib/python3.11/site-packages/keras/src/ops/nn.py:545: UserWarning: You are using a softmax over axis 3 of a tensor of shape torch.Size([1, 8, 1, 1]). This axis has size 1. The softmax operation will always return the value 1, which is likely not what you intended. Did you mean to use a sigmoid instead?
warnings.warn(
Fetching 6 files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:00<00:00, 60061.63it/s]
2025-03-21 01:20:47,887 - LLM.mlx_language_model - INFO - Warming up MLXLanguageModelHandler
/opt/anaconda3/envs/yuyin/lib/python3.11/site-packages/torch/nn/utils/weight_norm.py:134: FutureWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
WeightNorm.apply(module, name, dim)
/opt/anaconda3/envs/yuyin/lib/python3.11/site-packages/melo/download_utils.py:64: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
return torch.load(ckpt_path, map_location=device)
2025-03-21 01:20:56,977 - TTS.melo_handler - INFO - Warming up MeloTTSHandler
BertForMaskedLM has generative capabilities, as prepare_inputs_for_generation is explicitly overwritten. However, it doesn't directly inherit from GenerationMixin. From 👉v4.50👈 onwards, PreTrainedModel will NOT inherit from GenerationMixin, and this model will lose the ability to call generate and other related functions.

  • If you're using trust_remote_code=True, you can get rid of this warning by loading the model with an auto class. See https://huggingface.co/docs/transformers/en/model_doc/auto#auto-classes
  • If you are the owner of the model architecture code, please modify your model class such that it inherits from GenerationMixin (after PreTrainedModel, otherwise you'll get an exception).
  • If you are not the owner of the model architecture class, please contact the model code owner to update it.
    Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertForMaskedLM: ['bert.pooler.dense.bias', 'bert.pooler.dense.weight', 'cls.seq_relationship.bias', 'cls.seq_relationship.weight']
  • This IS expected if you are initializing BertForMaskedLM from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
  • This IS NOT expected if you are initializing BertForMaskedLM from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
    /opt/anaconda3/envs/yuyin/lib/python3.11/site-packages/torch/nn/functional.py:4552: UserWarning: MPS: The constant padding of more than 3 dimensions is not currently supported natively. It uses View Ops default implementation to run. This may have performance implications. (Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/aten/src/ATen/native/mps/operations/Pad.mm:472.)
    return torch._C._nn.pad(input, pad, mode, value)
    2025-03-21 01:21:00,751 - connections.local_audio_streamer - INFO - Starting local audio stream
    /opt/anaconda3/envs/yuyin/lib/python3.11/site-packages/keras/src/ops/nn.py:545: UserWarning: You are using a softmax over axis 3 of a tensor of shape torch.Size([1, 8, 1, 1]). This axis has size 1. The softmax operation will always return the value 1, which is likely not what you intended. Did you mean to use a sigmoid instead?
    warnings.warn(
    USER: You're
    ASSISTANT: I'm here to help you with any questions or topics you'd like to discuss.
    /opt/anaconda3/envs/yuyin/lib/python3.11/site-packages/keras/src/ops/nn.py:545: UserWarning: You are using a softmax over axis 3 of a tensor of shape torch.Size([1, 8, 1, 1]). This axis has size 1. The softmax operation will always return the value 1, which is likely not what you intended. Did you mean to use a sigmoid instead?
    warnings.warn(
    USER: Yeehaw.
    ASSISTANT: Howdy!
    ASSISTANT: What's gettin' you excited?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions