nl2py-v2-code-translator

0 downloads 0 likes on Hugging Face updated

Model card

NL2Py v2: English-to-Python Neural Code Translator

GitHub Repository License: MIT

Parent GitHub Repository: https://github.com/abdullah00ashraf/abdullah00ashraf
Ecosystem Documentation: Axiyon / Producttolaunch Catalog

Part of the Axiyon Research Ecosystem.
Author: Abdullah Ashraf (@abdullahashraf122)
GitHub Profile: https://github.com/abdullah00ashraf

Model Overview

NL2Py v2 is a specialized seq2seq transformer fine-tuned on the iamthedan/code-instructions-25k-python dataset with structural prompt prefixes (translate English to Python: ). It generates syntax-valid Python code snippets directly from natural language specifications.

Architecture Highlights

  • Base Architecture: T5-small (60M parameters)
  • Tokenizer: SentencePiece with custom prefix masking
  • Max Length: 128 input tokens $\to$ 512 target tokens
  • Loss Function: Cross-Entropy with label smoothing

Interactive Demo

Run the included app.py or execute the training pipeline via NL2Py_v2_Colab_Pipeline.ipynb.