translation

NanoTranslator by HyperbeeAI

Copyrights © 2023 Hyperbee.AI Inc. All rights reserved. hello@hyperbee.ai

This repository contains the Spanish-to-English translation utility by HyperbeeAI called NanoTranslator. The model takes up less than 400 KBs of RAM and provides accurate translation for casual conversations.

To run the demo, see explanations in "demo.ipynb", which acts as the serial terminal to communicate with the ai85 from the host PC. Further explanations are provided below as well as in the notebooks.

Demo

Contents:

Extras/Notes:

Setup:

This demo has been tested with the following configuration:

Python              3.8.10.
datasets            1.8.0    
huggingface-hub     0.0.10   
ipykernel           5.5.3    
ipython             7.22.0   
notebook            6.3.0    
numpy               1.20.2   
pyserial            3.5      
sacrebleu           1.5.1    
tokenizers          0.10.3   
torch               1.8.1    
torchtext           0.9.1    
tqdm                4.49.0

Note1: torchtext might default to older versions (e.g., v0.8) on some containers (typically in those provided by AWS, which use older versions of python that don't align well with the newer torchtext versions), in that case, the .legacy submodule path needs to be removed from the import directives in the .py files and Jupyter notebooks.

Note2: there are multiple python packages on pip that provide serial port implementation, with conflicting function/object names too. Although the package used here gets imported with "import serial", it needs to be installed via "pip install pyserial", not "pip install serial". Make sure you get the correct version.