Compare commits

..
Author SHA1 Message Date
hermes 971131a3b7 feat: 2o mirror de HF (unsloth) en el fallback del modelo
Si bartowski no responde, prueba unsloth (ambos no-gated, GGUF Q4_K_M
identico). Descarga en silencio (-sL) con barra previa ya mostrada.
2026-09-12 21:04:54 +02:00
hermes a7609f56b0 feat: fallback del modelo via HuggingFace si el registry falla (#8)
Co-authored-by: Hermes Agent <hermes@d0a1.es>
2026-09-12 21:04:18 +02:00
4 changed files with 44 additions and 8 deletions

No files matched your search

+11 -2
View File
@@ -137,8 +137,17 @@ if (-not $PullOk) {
# --- Fallback: mismo modelo via HuggingFace (otro CDN, no el registry de Ollama) ---
Warn 'Registry de Ollama no accesible. Probando via HuggingFace (mismo modelo)...'
$Gguf = Join-Path $ScriptDir 'llama3.2-3b-q4.gguf'
curl.exe -L -# --retry 3 --max-time 1800 -o "$Gguf" 'https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf'
if ($LASTEXITCODE -eq 0 -and (Get-Item $Gguf).Length -gt 1900000000) {
$Urls = @(
'https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf',
'https://huggingface.co/unsloth/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf'
)
$DlOk = $false
foreach ($Url in $Urls) {
curl.exe -sL --retry 3 --max-time 1800 -o "$Gguf" $Url
if ($LASTEXITCODE -eq 0 -and (Test-Path $Gguf) -and (Get-Item $Gguf).Length -gt 1900000000) { $DlOk = $true; break }
Warn "Mirror no accesible, probando el siguiente..."
}
if ($DlOk) {
docker cp "$Gguf" d0a1-hermes-ollama:/root/.ollama/import.gguf
docker exec d0a1-hermes-ollama sh -c 'echo FROM /root/.ollama/import.gguf > /tmp/mf && ollama create llama3.2:3b -f /tmp/mf'
$CreateOk = ($LASTEXITCODE -eq 0)
+11 -2
View File
@@ -137,8 +137,17 @@ if (-not $PullOk) {
# --- Fallback: mismo modelo via HuggingFace (otro CDN, no el registry de Ollama) ---
Warn 'Registry de Ollama no accesible. Probando via HuggingFace (mismo modelo)...'
$Gguf = Join-Path $ScriptDir 'llama3.2-3b-q4.gguf'
curl.exe -L -# --retry 3 --max-time 1800 -o "$Gguf" 'https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf'
if ($LASTEXITCODE -eq 0 -and (Get-Item $Gguf).Length -gt 1900000000) {
$Urls = @(
'https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf',
'https://huggingface.co/unsloth/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf'
)
$DlOk = $false
foreach ($Url in $Urls) {
curl.exe -sL --retry 3 --max-time 1800 -o "$Gguf" $Url
if ($LASTEXITCODE -eq 0 -and (Test-Path $Gguf) -and (Get-Item $Gguf).Length -gt 1900000000) { $DlOk = $true; break }
Warn "Mirror no accesible, probando el siguiente..."
}
if ($DlOk) {
docker cp "$Gguf" d0a1-openclaw-ollama:/root/.ollama/import.gguf
docker exec d0a1-openclaw-ollama sh -c 'echo FROM /root/.ollama/import.gguf > /tmp/mf && ollama create llama3.2:3b -f /tmp/mf'
$CreateOk = ($LASTEXITCODE -eq 0)
+11 -2
View File
@@ -154,8 +154,17 @@ if (-not $PullOk) {
# --- Fallback: mismo modelo via HuggingFace (otro CDN, no el registry de Ollama) ---
Warn 'Registry de Ollama no accesible. Probando via HuggingFace (mismo modelo)...'
$Gguf = Join-Path $ScriptDir 'llama3.2-3b-q4.gguf'
curl.exe -L -# --retry 3 --max-time 1800 -o "$Gguf" 'https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf'
if ($LASTEXITCODE -eq 0 -and (Get-Item $Gguf).Length -gt 1900000000) {
$Urls = @(
'https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf',
'https://huggingface.co/unsloth/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf'
)
$DlOk = $false
foreach ($Url in $Urls) {
curl.exe -sL --retry 3 --max-time 1800 -o "$Gguf" $Url
if ($LASTEXITCODE -eq 0 -and (Test-Path $Gguf) -and (Get-Item $Gguf).Length -gt 1900000000) { $DlOk = $true; break }
Warn "Mirror no accesible, probando el siguiente..."
}
if ($DlOk) {
docker cp "$Gguf" d0a1-ollama:/root/.ollama/import.gguf
docker exec d0a1-ollama sh -c 'echo FROM /root/.ollama/import.gguf > /tmp/mf && ollama create llama3.2:3b -f /tmp/mf'
$CreateOk = ($LASTEXITCODE -eq 0)
+11 -2
View File
@@ -190,8 +190,17 @@ if (-not $PullOk) {
# --- Fallback: mismo modelo via HuggingFace (otro CDN, no el registry de Ollama) ---
Warn 'Registry de Ollama no accesible. Probando via HuggingFace (mismo modelo)...'
$Gguf = Join-Path $ScriptDir 'llama3.2-3b-q4.gguf'
curl.exe -L -# --retry 3 --max-time 1800 -o "$Gguf" 'https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf'
if ($LASTEXITCODE -eq 0 -and (Get-Item $Gguf).Length -gt 1900000000) {
$Urls = @(
'https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf',
'https://huggingface.co/unsloth/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf'
)
$DlOk = $false
foreach ($Url in $Urls) {
curl.exe -sL --retry 3 --max-time 1800 -o "$Gguf" $Url
if ($LASTEXITCODE -eq 0 -and (Test-Path $Gguf) -and (Get-Item $Gguf).Length -gt 1900000000) { $DlOk = $true; break }
Warn "Mirror no accesible, probando el siguiente..."
}
if ($DlOk) {
docker cp "$Gguf" d0a1-wp-ollama:/root/.ollama/import.gguf
docker exec d0a1-wp-ollama sh -c 'echo FROM /root/.ollama/import.gguf > /tmp/mf && ollama create llama3.2:3b -f /tmp/mf'
$CreateOk = ($LASTEXITCODE -eq 0)