Download scripts/05_evaluate.sh from lollix91/boccaccioAI: direct link, hf CLI and curl.
- Browser
- Download file 1.26 kB
-
https://huggingface.co/lollix91/boccaccioAI/resolve/main/scripts/05_evaluate.sh
- Command line
-
hf download hf://lollix91/boccaccioAI/scripts/05_evaluate.sh
-
curl -L -o 05_evaluate.sh https://huggingface.co/lollix91/boccaccioAI/resolve/main/scripts/05_evaluate.sh
1.26 kB
| # 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 ===" | |