Spaces:
Configuration error
Configuration error
File size: 1,723 Bytes
0863bb2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# Fine-tuned Code Model for Vite, React, Next.js, Node.js, Python, and Go
This model is a fine-tuned version of [microsoft/CodeGPT-small-java-adaptedgpt2](https://huggingface.co/microsoft/CodeGPT-small-java-adaptedgpt2)
adapted for code understanding and generation tasks across several technologies:
Vite, React, Next.js, Node.js, Python, and Go.
The model was fine-tuned on code data extracted from private GitHub repositories.
## How to use
You can load and use this model with the `transformers` library:
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_path = "." # Or the repository ID after pushing to Hugging Face Hub
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(model_path)
# Example inference
input_text = "def fibonacci("
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
output_ids = model.generate(input_ids, max_length=50)
output_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
print(output_text)
```
## Fine-tuning Details
- **Base Model:** microsoft/CodeGPT-small-java-adaptedgpt2
- **Fine-tuning Data:** Code from private GitHub repositories focusing on Vite, React, Next.js, Node.js, Python, and Go.
- **Training Parameters:** (Include key parameters from TrainingArguments here, e.g., epochs, batch size)
- Number of Epochs: 3
- Per Device Train Batch Size: 2
- Learning Rate: 2e-5
## Limitations
- This model was fine-tuned on a limited private dataset and may not generalize well to all code scenarios or languages.
- The model size is optimized for deployment on Hugging Face Spaces with a 2GB limit, which might impact its performance compared to larger models.
|