Phi1-1.3B
FreeMicrosoft's 1.3B parameter code generation model for basic Python
FreeFree tier
About Phi1-1.3B
Phi-1 is a 1.3 billion parameter Transformer model developed by Microsoft, specialized for basic Python code generation. Trained on a curated dataset including Python code from The Stack v1.2, StackOverflow Q&A, competition code, and synthetic textbooks generated by GPT-3.5-turbo, Phi-1 achieves over 50% accuracy on the HumanEval benchmark despite its relatively small size. The model is best used with prompts in a code format where it completes the function implementation. It is released under the MIT license and is available on Hugging Face with support for the Transformers library (version 4.37.0+).
Key Features
1.3 billion parameter Transformer model
Specialized for basic Python coding
Trained on curated data including The Stack v1.2, StackOverflow, and synthetic textbooks
Achieves over 50% accuracy on HumanEval benchmark
Released under MIT license
Available on Hugging Face with transformers integration
Pros & Cons
Pros
- Small model size (1.3B) enables efficient inference
- Good performance on basic Python coding tasks
- Open-source with permissive MIT license
- Easy to use with Hugging Face transformers library
- Trained on high-quality synthetic data
Cons
- Limited to basic Python coding; not suited for general language tasks
- May generate incorrect or insecure code and should be used with caution
- Relatively small compared to larger LLMs, may not handle complex coding
- Only supports English and code input
Best For
Generating Python functions from code promptsAssisting with basic coding tasksEducational tool for learning Python programmingCode completion in development environments
FAQ
What is Phi-1?
Phi-1 is a Transformer language model with 1.3 billion parameters, specialized for basic Python code generation.
Who developed Phi-1?
Phi-1 was developed by Microsoft and is hosted on Hugging Face.
What training data was used?
Training data included subsets of Python codes from The Stack v1.2, StackOverflow Q&A, competition code from code_contests, and synthetic Python textbooks and exercises generated by GPT-3.5-turbo.
How well does Phi-1 perform?
Phi-1 achieves over 50% accuracy on the simple Python coding benchmark, HumanEval.
How do I use Phi-1?
Phi-1 can be used with the Hugging Face transformers library (version 4.37.0 or higher). It is best used with code format prompts where the model generates code after comments.