Framework completo per il fine-tuning e confronto di modelli Gemma3 (270M & 1B) vs CodeS-1B su multiple task NLP. Include ottimizzazioni per GPU consumer (4-8GB VRAM) con quantizzazione 4-bit e supporto LoRA.
google/gemma-3-1b-it: Modello instruction-tuned da 1B parametri| Modello | Exact Match | Semantic Similarity | Training Time | VRAM |
|---|---|---|---|---|
| Codes-1B ๐ฅ | 62.5% | - | 113s | 4GB |
| CodeT5 | 0% | 56.9% | 26s | 4GB |
| Gemma3-270M | 0% | 41.7% | 54s | 4GB |
| Modello | F1 Score | Precision | Recall | Training Time |
|---|---|---|---|---|
| Gemma3-270M ๐ฅ | 98.3% | 98.4% | 98.3% | 7 min |
| spaCy Fine-tuned | 98.4% | - | - | 4 min |
| spaCy Generic | 53.3% | - | - | - |
| Modello | Accuracy | F1 Score | Training Time | Status |
|---|---|---|---|---|
| Codes-1B Improved ๐ฅ | 100% | 1.000 | 8h | Perfetto |
| Codes-1B Original | 25% | 0.182 | 62s | Fallito |
| Modello | Training Loss | Training Time | Examples |
|---|---|---|---|
| Codes-1B | 1.306 | 94s | 153/52 |
โโโ docs/ # Documentazione completa
โโโ data/ # Dataset organizzati per task
โ โโโ ner/ # Named Entity Recognition
โ โโโ text2sql/ # Text-to-SQL generation
โ โโโ intent_classification/ # Classificazione intenti
โ โโโ hashtag_generation/ # Generazione hashtag
โโโ scripts/ # Script organizzati
โ โโโ training/ # Training dei modelli
โ โโโ evaluation/ # Valutazione e metriche
โ โโโ data_preparation/ # Preparazione dataset
โโโ models/ # Modelli finali
โ โโโ production/ # Modelli migliori per produzione
โ โโโ experiments/ # Esperimenti
โโโ results/ # Risultati e metriche
# NER con Gemma3-270M
poetry run python scripts/training/train_gemma3_ner.py
# Text2SQL con Codes-1B
poetry run python scripts/training/train_codes1b_text2sql.py
# Training completo NER + Hashtag + Confronto
poetry run python scripts/run_gemma3_1b_experiments.py --step all
# Solo training NER
poetry run python scripts/run_gemma3_1b_experiments.py --step ner
# Confronto Gemma3 1B vs CodeS-1B
poetry run python scripts/evaluation/gemma3_vs_codes1b_comparison.py
# Valutazione completa tutti i modelli (270M focus)
poetry run python scripts/evaluation/evaluate_all.py
16 commits
Python
99.8%
Framework completo per il fine-tuning e confronto di modelli Gemma3 (270M & 1B) vs CodeS-1B su multiple task NLP. Include ottimizzazioni per GPU consumer (4-8GB VRAM) con quantizzazione 4-bit e supporto LoRA.
google/gemma-3-1b-it: Modello instruction-tuned da 1B parametri| Modello | Exact Match | Semantic Similarity | Training Time | VRAM |
|---|---|---|---|---|
| Codes-1B ๐ฅ | 62.5% | - | 113s | 4GB |
| CodeT5 | 0% | 56.9% | 26s | 4GB |
| Gemma3-270M | 0% | 41.7% | 54s | 4GB |
| Modello | F1 Score | Precision | Recall | Training Time |
|---|---|---|---|---|
| Gemma3-270M ๐ฅ | 98.3% | 98.4% | 98.3% | 7 min |
| spaCy Fine-tuned | 98.4% | - | - | 4 min |
| spaCy Generic | 53.3% | - | - | - |
| Modello | Accuracy | F1 Score | Training Time | Status |
|---|---|---|---|---|
| Codes-1B Improved ๐ฅ | 100% | 1.000 | 8h | Perfetto |
| Codes-1B Original | 25% | 0.182 | 62s | Fallito |
| Modello | Training Loss | Training Time | Examples |
|---|---|---|---|
| Codes-1B | 1.306 | 94s | 153/52 |
โโโ docs/ # Documentazione completa
โโโ data/ # Dataset organizzati per task
โ โโโ ner/ # Named Entity Recognition
โ โโโ text2sql/ # Text-to-SQL generation
โ โโโ intent_classification/ # Classificazione intenti
โ โโโ hashtag_generation/ # Generazione hashtag
โโโ scripts/ # Script organizzati
โ โโโ training/ # Training dei modelli
โ โโโ evaluation/ # Valutazione e metriche
โ โโโ data_preparation/ # Preparazione dataset
โโโ models/ # Modelli finali
โ โโโ production/ # Modelli migliori per produzione
โ โโโ experiments/ # Esperimenti
โโโ results/ # Risultati e metriche
# NER con Gemma3-270M
poetry run python scripts/training/train_gemma3_ner.py
# Text2SQL con Codes-1B
poetry run python scripts/training/train_codes1b_text2sql.py
# Training completo NER + Hashtag + Confronto
poetry run python scripts/run_gemma3_1b_experiments.py --step all
# Solo training NER
poetry run python scripts/run_gemma3_1b_experiments.py --step ner
# Confronto Gemma3 1B vs CodeS-1B
poetry run python scripts/evaluation/gemma3_vs_codes1b_comparison.py
# Valutazione completa tutti i modelli (270M focus)
poetry run python scripts/evaluation/evaluate_all.py
16 commits
Python
99.8%