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.
This commit is contained in:
1 parent
a7609f56b0
commit
971131a3b7
4 files changed
+44
-8
No files matched your search
+11
-2
@@ -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
@@ -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
@@ -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
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user