dusty-nv / NanoLLM

Optimized local inference for LLMs with HuggingFace-like APIs for quantization, vision/language models, multimodal agents, speech, vector DB, and RAG.
https://dusty-nv.github.io/NanoLLM/
MIT License
196 stars 31 forks source link

Import typo in auto_asr.py? #22

Open lukecdash opened 4 months ago

lukecdash commented 4 months ago

Hi, i'm sorry, this library looks amazing, I am just trying to run this example from the documentation. The traceback indicates to me it is looking in plugins/audio for a module riva_asr.py which is in plugins/speech. Could this just be as simple as a typo? in the code?

jetson-containers run --env HUGGINGFACE_TOKEN=---------------------------------------- $(autotag nano_llm) python3 -m nano_llm.agents.web_chat --api=mlc --model meta-llama/Meta-Llama-3-8B-Instruct --asr=riva --tts=piper Namespace(packages=['nano_llm'], prefer=['local', 'registry', 'build'], disable=[''], user='dustynv', output='/tmp/autotag', quiet=False, verbose=False) -- L4T_VERSION=36.3.0 JETPACK_VERSION=6.0 CUDA_VERSION=12.2 -- Finding compatible container image for ['nano_llm'] dustynv/nano_llm:r36.2.0 [sudo] password for nvidia16: Sorry, try again. [sudo] password for nvidia16: localuser:root being added to access control list

18:20:00 | INFO | using chat template 'llama-3' for model Meta-Llama-3-8B-Instruct 18:20:00 | INFO | model 'Meta-Llama-3-8B-Instruct', chat template 'llama-3' stop tokens: ['<|end_of_text|>', '<|eot_id|>'] -> [128001, 128009] 18:20:00 | INFO | Warming up LLM with query 'What is 2+2?' 18:20:02 | INFO | Warmup response: 'Easy peasy!\n\nThe answer to 2+2 is... 4!<|eot_id|>' Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/opt/NanoLLM/nano_llm/agents/web_chat.py", line 327, in agent = WebChat(vars(args)) File "/opt/NanoLLM/nano_llm/agents/web_chat.py", line 32, in init super().init(kwargs) File "/opt/NanoLLM/nano_llm/agents/voice_chat.py", line 38, in init self.asr = AutoASR.from_pretrained(asr=asr, **kwargs) File "/opt/NanoLLM/nano_llm/plugins/speech/auto_asr.py", line 34, in from_pretrained from nano_llm.plugins.audio.riva_asr import RivaASR ModuleNotFoundError: No module named 'nano_llm.plugins.audio.riva_asr'

dusty-nv commented 4 months ago

Yes, sorry about that - it is fixed in main branch, but please see https://github.com/dusty-nv/NanoLLM/issues/20#issuecomment-2181285298 for workaround to use 24.6 release of nano_llm container for now 👍


From: lukecdash @.> Sent: Friday, June 21, 2024 2:38:49 PM To: dusty-nv/NanoLLM @.> Cc: Subscribed @.***> Subject: [dusty-nv/NanoLLM] Import typo in auto_asr.py? (Issue #22)

Hi, i'm sorry, this library looks amazing, I am just trying to run this example from the documentation. The traceback indicates to me it is looking in plugins/audio for a module riva_asr.py which is in plugins/speech. Could this just be as simple as a typo? in the code?

jetson-containers run --env HUGGINGFACE_TOKEN=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 $(autotag nano_llm) python3 -m nano_llm.agents.web_chat --api=mlc --model meta-llama/Meta-Llama-3-8B-Instruct --asr=riva --tts=piper Namespace(packages=['nano_llm'], prefer=['local', 'registry', 'build'], disable=[''], user='dustynv', output='/tmp/autotag', quiet=False, verbose=False) -- L4T_VERSION=36.3.0 JETPACK_VERSION=6.0 CUDA_VERSION=12.2 -- Finding compatible container image for ['nano_llm'] dustynv/nano_llm:r36.2.0 [sudo] password for nvidia16: Sorry, try again. [sudo] password for nvidia16: localuser:root being added to access control list

18:20:00 | INFO | using chat template 'llama-3' for model Meta-Llama-3-8B-Instruct 18:20:00 | INFO | model 'Meta-Llama-3-8B-Instruct', chat template 'llama-3' stop tokens: ['<|end_of_text|>', '<|eot_id|>'] -> [128001, 128009] 18:20:00 | INFO | Warming up LLM with query 'What is 2+2?' 18:20:02 | INFO | Warmup response: 'Easy peasy!\n\nThe answer to 2+2 is... 4!<|eot_id|>' Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/opt/NanoLLM/nano_llm/agents/web_chat.py", line 327, in agent = WebChat(vars(args)) File "/opt/NanoLLM/nano_llm/agents/web_chat.py", line 32, in init super().init(kwargs) File "/opt/NanoLLM/nano_llm/agents/voice_chat.py", line 38, in init self.asr = AutoASR.from_pretrained(asr=asr, **kwargs) File "/opt/NanoLLM/nano_llm/plugins/speech/auto_asr.py", line 34, in from_pretrained from nano_llm.plugins.audio.riva_asr import RivaASR ModuleNotFoundError: No module named 'nano_llm.plugins.audio.riva_asr'

— Reply to this email directly, view it on GitHubhttps://github.com/dusty-nv/NanoLLM/issues/22, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADVEGK77NVHGX43ITMIEQG3ZIRXLTAVCNFSM6AAAAABJWSIFXWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM3DOMBWHAYTGMA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

lukecdash commented 4 months ago

Oh sorry I missed that thank you for pointing me to that!