Download scripts/chat_model.ps1 from Ian26/MarsLM: direct link, hf CLI and curl.
- Browser
- Download file 872 Bytes
-
https://huggingface.co/Ian26/MarsLM/resolve/main/scripts/chat_model.ps1
- Command line
-
hf download hf://Ian26/MarsLM/scripts/chat_model.ps1
-
curl -L -o chat_model.ps1 https://huggingface.co/Ian26/MarsLM/resolve/main/scripts/chat_model.ps1
872 Bytes
| # PowerShell helper para cargar el modelo y abrir un prompt interactivo. | |
| # Ejecuta este script desde el directorio MarsLM. | |
| param( | |
| [string]$ModelPath = "artifacts\checkpoints\marslm-final.pt", | |
| [string]$ConfigPath = "artifacts\checkpoints\config.json", | |
| [string]$TokenizerPath = "artifacts\tokenizer\marslm.json", | |
| [int]$MaxNewTokens = 128, | |
| [double]$Temperature = 0.8, | |
| [int]$TopK = 50, | |
| [double]$TopP = 0.0, | |
| [double]$RepetitionPenalty = 1.0 | |
| ) | |
| $root = Split-Path -Parent $MyInvocation.MyCommand.Path | |
| Set-Location "$root\.." | |
| Write-Host "Iniciando MarsLM en modo interactivo..." | |
| python inference/generate.py --model-path $ModelPath --config $ConfigPath --tokenizer-model $TokenizerPath --interactive --max-new-tokens $MaxNewTokens --temperature $Temperature --top-k $TopK --top-p $TopP --repetition-penalty $RepetitionPenalty | |