File size: 1,263 Bytes
187a491 | 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 43 44 | #!/bin/bash
# BoccaccioAI - Fase 5: Evaluation and Export
# De Lauretis Tech
set -euo pipefail
echo "=== BoccaccioAI - Evaluation ==="
# Chat mode test (same template as training)
python -m src.inference.generate \
--model-dir checkpoints/finetune \
--tokenizer-path tokenizer/boccaccio-32k.json \
--config-path configs/model.yaml \
--mode chat \
--prompt "Qual e' la capitale dell'Italia?" \
--max-new-tokens 128 \
--temperature 0.3
echo "---"
# Chat mode with system prompt
python -m src.inference.generate \
--model-dir checkpoints/finetune \
--tokenizer-path tokenizer/boccaccio-32k.json \
--config-path configs/model.yaml \
--mode chat \
--system-prompt "Sei un assistente utile che risponde in italiano." \
--prompt "Spiega la fotosintesi in modo semplice." \
--max-new-tokens 256 \
--temperature 0.5
echo "---"
# Free generation test (pretrain-style, no template)
python -m src.inference.generate \
--model-dir checkpoints/finetune \
--tokenizer-path tokenizer/boccaccio-32k.json \
--config-path configs/model.yaml \
--mode generate \
--prompt "L'intelligenza artificiale in Italia" \
--max-new-tokens 256 \
--temperature 0.7
echo "=== Evaluation complete ==="
|