{"id":28166266,"url":"https://github.com/shreydan/multilingual-translation","last_synced_at":"2025-10-16T06:47:42.822Z","repository":{"id":204948189,"uuid":"713039144","full_name":"shreydan/multilingual-translation","owner":"shreydan","description":"Training a transformer for multilingual translation from scratch. Translates English to Hindi or Telugu. Trained on the Opus100 dataset for learning purposes.","archived":false,"fork":false,"pushed_at":"2023-11-01T18:09:13.000Z","size":341,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-04T09:03:49.601Z","etag":null,"topics":["indic-languages","transformers","translation"],"latest_commit_sha":null,"homepage":"https://www.kaggle.com/code/shreydan/en-hi-te-translation/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shreydan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-01T18:00:42.000Z","updated_at":"2024-07-17T11:10:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"4b53c15d-2cb9-4fa2-a7db-fb48f01a0d07","html_url":"https://github.com/shreydan/multilingual-translation","commit_stats":null,"previous_names":["shreydan/multilingual-translation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shreydan/multilingual-translation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreydan%2Fmultilingual-translation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreydan%2Fmultilingual-translation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreydan%2Fmultilingual-translation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreydan%2Fmultilingual-translation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shreydan","download_url":"https://codeload.github.com/shreydan/multilingual-translation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreydan%2Fmultilingual-translation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279163631,"owners_count":26117495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-16T02:00:06.019Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["indic-languages","transformers","translation"],"created_at":"2025-05-15T13:11:39.765Z","updated_at":"2025-10-16T06:47:42.786Z","avatar_url":"https://github.com/shreydan.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multilingual Machine Translation with Transformers\n\n\u003e This project was for learning purposes only. Hence, focused on getting decent results rather than building an alternative to existing multilingual models.\n\n- Implemented a [7M parameter model](./model.py).\n- Trained a BERT style tokenizer.\n- Trained on [Opus100](https://huggingface.co/datasets/opus100) Dataset with `en-hi` \u0026 `en-te` subsets.\n- Go through the entirety on [Kaggle](https://www.kaggle.com/code/shreydan/en-hi-te-translation).\n\n```\nENGLISH ----\u003e HINDI\n          |\n          --\u003e TELUGU\n```\n\n## Working\n\n- The model understands which language to translate to based on the preceding beginning-of-sentence `bos` token:\n  - english sentences start with `\u003cs-en\u003e` token\n  - hindi sentences start with `\u003cs-hi\u003e` token\n  - telugu sentences start with `\u003cs-te\u003e` token\n  - all sentences end with `\u003c/s\u003e` token\n- trained as a Sequence-to-Sequence transformer model with an encoder-decoder style architecture. Encoder handles english and decoder handles both hindi \u0026 telugu.\n\n\n## Model Config\n```py\nconfig = {\n    'dim': 128,\n    'n_heads': 4,\n    'attn_dropout': 0.1,\n    'mlp_dropout': 0.1,\n    'depth': 8,\n    'vocab_size': 30000,\n    'max_len': 128\n }\n```\n\n## Inference Results\n\n```\npython inference.py --text 'how are you?' -l hi -s\n\u003e\u003e\u003e आप कैसे हैं?\n\npython inference.py --text 'please call me' -l hi   \n\u003e\u003e\u003e कृपया मुझे पुकारो\n\npython inference.py --text 'what are you doing?' -l te -s -t 0.5\n\u003e\u003e\u003e మీరు ఏం చేస్తున్నారు?\n\npython inference.py --text \"what's wrong?\" -l te -s\n\u003e\u003e\u003e ఏమి తప్పు?\n```\n\n\u003e The results are kinda hilarious but atleast it works.\n\n\n\u003e Here's the SOTA model if you really want good quality multilingual indic translation: [ai4bharat/indictrans2-indic-en-1B](https://huggingface.co/ai4bharat/indictrans2-indic-en-1B), it's even used by the govt. of India officially.\n\n\n```\nI have refrained my feet from every evil way,\nThat I might keep thy word.\n                                Psalm 119:101\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshreydan%2Fmultilingual-translation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshreydan%2Fmultilingual-translation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshreydan%2Fmultilingual-translation/lists"}