Add llamacpp container
Este commit está contenido en:
22
Services/llamacpp-swap/Scripts/startBaseMedium.sh
Archivo ejecutable
22
Services/llamacpp-swap/Scripts/startBaseMedium.sh
Archivo ejecutable
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Report descrittivi: 0.6 ok; 0.55 più stabile
|
||||
TEMP=${BASE_TEMP:-0.6}
|
||||
exec /app/llama-server $BASE_MEDIUM_MODEL \
|
||||
-c $BASE_CONTEXT_SIZE -ngl $BASE_GPU_LAYERS -n $BASE_MAX_TOKENS \
|
||||
--temp $TEMP --top-p 0.9 --top-k 40 --repeat-penalty 1.1 \
|
||||
--flash-attn auto --threads -1 --threads-batch -1 --threads-http -1 \
|
||||
--jinja \
|
||||
--timeout 600 --host 0.0.0.0 --port 8092 &
|
||||
PID=$!
|
||||
|
||||
cleanup() {
|
||||
echo "Stopping llama-server..."
|
||||
kill $PID 2>/dev/null
|
||||
wait $PID 2>/dev/null
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap cleanup SIGTERM SIGINT
|
||||
|
||||
wait $PID
|
||||
20
Services/llamacpp-swap/Scripts/startBaseMini.sh
Archivo ejecutable
20
Services/llamacpp-swap/Scripts/startBaseMini.sh
Archivo ejecutable
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec /app/llama-server $BASE_MINI_MODEL \
|
||||
-c 4096 -n 128 \
|
||||
--temp 0.2 --top-p 0.9 --top-k 40 --repeat-penalty 1.05 \
|
||||
--flash-attn auto --threads -1 --threads-batch -1 --threads-http -1 \
|
||||
--jinja \
|
||||
--timeout 600 --host 0.0.0.0 --port 8091 &
|
||||
PID=$!
|
||||
|
||||
cleanup() {
|
||||
echo "Stopping llama-server..."
|
||||
kill $PID 2>/dev/null
|
||||
wait $PID 2>/dev/null
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap cleanup SIGTERM SIGINT
|
||||
|
||||
wait $PID
|
||||
20
Services/llamacpp-swap/Scripts/startBaseTop.sh
Archivo ejecutable
20
Services/llamacpp-swap/Scripts/startBaseTop.sh
Archivo ejecutable
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec /app/llama-server $BASE_TOP_MODEL \
|
||||
-c $BASE_CONTEXT_SIZE -ngl $BASE_GPU_LAYERS -n $BASE_MAX_TOKENS \
|
||||
--temp 0.5 --top-p 0.9 --top-k 40 --repeat-penalty 1.1 \
|
||||
--flash-attn auto --threads -1 --threads-batch -1 --threads-http -1 \
|
||||
--jinja \
|
||||
--timeout 900 --host 0.0.0.0 --port 8093 &
|
||||
PID=$!
|
||||
|
||||
cleanup() {
|
||||
echo "Stopping llama-server..."
|
||||
kill $PID 2>/dev/null
|
||||
wait $PID 2>/dev/null
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap cleanup SIGTERM SIGINT
|
||||
|
||||
wait $PID
|
||||
22
Services/llamacpp-swap/Scripts/startChat.sh
Archivo ejecutable
22
Services/llamacpp-swap/Scripts/startChat.sh
Archivo ejecutable
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Report descrittivi: 0.6 ok; 0.55 più stabile
|
||||
TEMP=${GENERAL_TEMP:-0.6}
|
||||
exec /app/llama-server $CHAT_MODEL \
|
||||
-c $GENERAL_CONTEXT_SIZE -ngl $GENERAL_GPU_LAYERS -n $GENERAL_MAX_TOKENS \
|
||||
--temp $TEMP --top-p 0.9 --top-k 40 --repeat-penalty 1.1 \
|
||||
--flash-attn auto --threads -1 --threads-batch -1 --threads-http -1 \
|
||||
--jinja \
|
||||
--timeout 600 --host 0.0.0.0 --port 8093 &
|
||||
PID=$!
|
||||
|
||||
cleanup() {
|
||||
echo "Stopping llama-server..."
|
||||
kill $PID 2>/dev/null
|
||||
wait $PID 2>/dev/null
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap cleanup SIGTERM SIGINT
|
||||
|
||||
wait $PID
|
||||
20
Services/llamacpp-swap/Scripts/startCoder.sh
Archivo ejecutable
20
Services/llamacpp-swap/Scripts/startCoder.sh
Archivo ejecutable
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec /app/llama-server $CODER_MODEL \
|
||||
-c $CODER_CONTEXT_SIZE -n $CODER_MAX_TOKENS \
|
||||
--temp 0.3 --top-p 0.9 --top-k 40 --repeat-penalty 1.05 \
|
||||
--flash-attn auto --threads -1 --threads-batch -1 --threads-http -1 \
|
||||
--jinja \
|
||||
--timeout 600 --host 0.0.0.0 --port 8094 &
|
||||
PID=$!
|
||||
|
||||
cleanup() {
|
||||
echo "Stopping llama-server..."
|
||||
kill $PID 2>/dev/null
|
||||
wait $PID 2>/dev/null
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap cleanup SIGTERM SIGINT
|
||||
|
||||
wait $PID
|
||||
23
Services/llamacpp-swap/Scripts/startCoderMedium.sh
Archivo ejecutable
23
Services/llamacpp-swap/Scripts/startCoderMedium.sh
Archivo ejecutable
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Prefer Q6 + mmap; fallback to no-mmap only if explicitly requested
|
||||
EXTRA=""
|
||||
if [[ "$FORCE_NO_MMAP_CODER" == "1" ]]; then EXTRA="--no-mmap"; fi
|
||||
exec /app/llama-server $CODER_MEDIUM_MODEL \
|
||||
-c $CODER_CONTEXT_SIZE -ngl $CODER_GPU_LAYERS -n $CODER_MAX_TOKENS \
|
||||
--temp 0.5 --top-p 0.9 --top-k 40 --repeat-penalty 1.1 $EXTRA \
|
||||
--flash-attn auto --threads -1 --threads-batch -1 --threads-http -1 \
|
||||
--jinja \
|
||||
--timeout 900 --host 0.0.0.0 --port 8095 &
|
||||
PID=$!
|
||||
|
||||
cleanup() {
|
||||
echo "Stopping llama-server..."
|
||||
kill $PID 2>/dev/null
|
||||
wait $PID 2>/dev/null
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap cleanup SIGTERM SIGINT
|
||||
|
||||
wait $PID
|
||||
19
Services/llamacpp-swap/Scripts/startCoderMini.sh
Archivo ejecutable
19
Services/llamacpp-swap/Scripts/startCoderMini.sh
Archivo ejecutable
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec /app/llama-server $CODER_MINI_MODEL \
|
||||
-c 4096 -n 256 \
|
||||
--temp 0.3 --top-p 0.9 --top-k 40 --repeat-penalty 1.05 \
|
||||
--flash-attn auto --threads -1 --threads-batch -1 --threads-http -1 \
|
||||
--timeout 600 --host 0.0.0.0 --port 8094 &
|
||||
PID=$!
|
||||
|
||||
cleanup() {
|
||||
echo "Stopping llama-server..."
|
||||
kill $PID 2>/dev/null
|
||||
wait $PID 2>/dev/null
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap cleanup SIGTERM SIGINT
|
||||
|
||||
wait $PID
|
||||
32
Services/llamacpp-swap/Scripts/startCoderTop.sh
Archivo ejecutable
32
Services/llamacpp-swap/Scripts/startCoderTop.sh
Archivo ejecutable
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Large model: auto-select mmap based on GPU layers
|
||||
# <= 45 layers: use mmap (less VRAM usage, faster startup)
|
||||
# > 45 layers: disable mmap (avoids SVM limits)
|
||||
LAYERS=${CODER_TOP_GPU_LAYERS:-55}
|
||||
MMAP_OPT=""
|
||||
if [ "$LAYERS" -gt 45 ]; then
|
||||
MMAP_OPT="--no-mmap"
|
||||
echo "Using --no-mmap (layers=$LAYERS > 45)"
|
||||
else
|
||||
echo "Using mmap (layers=$LAYERS <= 45)"
|
||||
fi
|
||||
exec /app/llama-server $CODER_TOP_MODEL \
|
||||
-c $CODER_CONTEXT_SIZE -ngl $LAYERS -n $CODER_MAX_TOKENS \
|
||||
--temp 0.45 --top-p 0.9 --top-k 40 --repeat-penalty 1.12 \
|
||||
$MMAP_OPT \
|
||||
--flash-attn auto --threads -1 --threads-batch -1 --threads-http -1 \
|
||||
--jinja \
|
||||
--timeout 1200 --host 0.0.0.0 --port 8096 &
|
||||
PID=$!
|
||||
|
||||
cleanup() {
|
||||
echo "Stopping llama-server..."
|
||||
kill $PID 2>/dev/null
|
||||
wait $PID 2>/dev/null
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap cleanup SIGTERM SIGINT
|
||||
|
||||
wait $PID
|
||||
18
Services/llamacpp-swap/Scripts/startEmbedding.sh
Archivo ejecutable
18
Services/llamacpp-swap/Scripts/startEmbedding.sh
Archivo ejecutable
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec /app/llama-server $EMBEDDING_MODEL \
|
||||
--embeddings --pooling mean \
|
||||
--flash-attn auto --threads -1 --threads-http -1 \
|
||||
--timeout 600 --host 0.0.0.0 --port 8096 &
|
||||
PID=$!
|
||||
|
||||
cleanup() {
|
||||
echo "Stopping llama-server..."
|
||||
kill $PID 2>/dev/null
|
||||
wait $PID 2>/dev/null
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap cleanup SIGTERM SIGINT
|
||||
|
||||
wait $PID
|
||||
18
Services/llamacpp-swap/Scripts/startEmbeddingFast.sh
Archivo ejecutable
18
Services/llamacpp-swap/Scripts/startEmbeddingFast.sh
Archivo ejecutable
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec /app/llama-server $EMBEDDING_FAST_MODEL \
|
||||
--embeddings --pooling mean \
|
||||
--flash-attn auto --threads -1 --threads-http -1 \
|
||||
--timeout 600 --host 0.0.0.0 --port 8095 &
|
||||
PID=$!
|
||||
|
||||
cleanup() {
|
||||
echo "Stopping llama-server..."
|
||||
kill $PID 2>/dev/null
|
||||
wait $PID 2>/dev/null
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap cleanup SIGTERM SIGINT
|
||||
|
||||
wait $PID
|
||||
18
Services/llamacpp-swap/Scripts/startEmbeddingMedium.sh
Archivo ejecutable
18
Services/llamacpp-swap/Scripts/startEmbeddingMedium.sh
Archivo ejecutable
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec /app/llama-server $EMBEDDING_MEDIUM_MODEL \
|
||||
--embeddings --pooling mean \
|
||||
--flash-attn auto --threads -1 --threads-http -1 \
|
||||
--timeout 600 --host 0.0.0.0 --port 8098 &
|
||||
PID=$!
|
||||
|
||||
cleanup() {
|
||||
echo "Stopping llama-server..."
|
||||
kill $PID 2>/dev/null
|
||||
wait $PID 2>/dev/null
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap cleanup SIGTERM SIGINT
|
||||
|
||||
wait $PID
|
||||
18
Services/llamacpp-swap/Scripts/startEmbeddingMini.sh
Archivo ejecutable
18
Services/llamacpp-swap/Scripts/startEmbeddingMini.sh
Archivo ejecutable
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec /app/llama-server $EMBEDDING_MINI_MODEL \
|
||||
--embeddings --pooling mean \
|
||||
--flash-attn auto --threads -1 --threads-http -1 \
|
||||
--timeout 600 --host 0.0.0.0 --port 8097 &
|
||||
PID=$!
|
||||
|
||||
cleanup() {
|
||||
echo "Stopping llama-server..."
|
||||
kill $PID 2>/dev/null
|
||||
wait $PID 2>/dev/null
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap cleanup SIGTERM SIGINT
|
||||
|
||||
wait $PID
|
||||
18
Services/llamacpp-swap/Scripts/startEmbeddingTop.sh
Archivo ejecutable
18
Services/llamacpp-swap/Scripts/startEmbeddingTop.sh
Archivo ejecutable
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec /app/llama-server $EMBEDDING_TOP_MODEL \
|
||||
--embeddings --pooling mean \
|
||||
--flash-attn auto --threads -1 --threads-http -1 \
|
||||
--timeout 600 --host 0.0.0.0 --port 8099 &
|
||||
PID=$!
|
||||
|
||||
cleanup() {
|
||||
echo "Stopping llama-server..."
|
||||
kill $PID 2>/dev/null
|
||||
wait $PID 2>/dev/null
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap cleanup SIGTERM SIGINT
|
||||
|
||||
wait $PID
|
||||
22
Services/llamacpp-swap/Scripts/startGeneral.sh
Archivo ejecutable
22
Services/llamacpp-swap/Scripts/startGeneral.sh
Archivo ejecutable
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Report descrittivi: 0.6 ok; 0.55 più stabile
|
||||
TEMP=${GENERAL_TEMP:-0.6}
|
||||
exec /app/llama-server $GENERAL_MODEL \
|
||||
-c $GENERAL_CONTEXT_SIZE -ngl $GENERAL_GPU_LAYERS -n $GENERAL_MAX_TOKENS \
|
||||
--temp $TEMP --top-p 0.9 --top-k 40 --repeat-penalty 1.1 \
|
||||
--flash-attn auto --threads -1 --threads-batch -1 --threads-http -1 \
|
||||
--jinja \
|
||||
--timeout 600 --host 0.0.0.0 --port 8092 &
|
||||
PID=$!
|
||||
|
||||
cleanup() {
|
||||
echo "Stopping llama-server..."
|
||||
kill $PID 2>/dev/null
|
||||
wait $PID 2>/dev/null
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap cleanup SIGTERM SIGINT
|
||||
|
||||
wait $PID
|
||||
20
Services/llamacpp-swap/Scripts/startGeneralFast.sh
Archivo ejecutable
20
Services/llamacpp-swap/Scripts/startGeneralFast.sh
Archivo ejecutable
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec /app/llama-server $GENERAL_FAST_MODEL \
|
||||
-c $GENERAL_CONTEXT_SIZE -n 128 \
|
||||
--temp 0.6 --top-p 0.9 --top-k 40 --repeat-penalty 1.05 \
|
||||
--flash-attn auto --threads -1 --threads-batch -1 --threads-http -1 \
|
||||
--jinja \
|
||||
--timeout 600 --host 0.0.0.0 --port 8091 &
|
||||
PID=$!
|
||||
|
||||
cleanup() {
|
||||
echo "Stopping llama-server..."
|
||||
kill $PID 2>/dev/null
|
||||
wait $PID 2>/dev/null
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap cleanup SIGTERM SIGINT
|
||||
|
||||
wait $PID
|
||||
3
Services/llamacpp-swap/Scripts/stopBaseMedium.sh
Archivo ejecutable
3
Services/llamacpp-swap/Scripts/stopBaseMedium.sh
Archivo ejecutable
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
pkill -f "llama-server.*8092" || true
|
||||
3
Services/llamacpp-swap/Scripts/stopBaseMini.sh
Archivo ejecutable
3
Services/llamacpp-swap/Scripts/stopBaseMini.sh
Archivo ejecutable
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
pkill -f "llama-server.*8091" || true
|
||||
3
Services/llamacpp-swap/Scripts/stopBaseTop.sh
Archivo ejecutable
3
Services/llamacpp-swap/Scripts/stopBaseTop.sh
Archivo ejecutable
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
pkill -f "llama-server.*8093" || true
|
||||
4
Services/llamacpp-swap/Scripts/stopChat.sh
Archivo ejecutable
4
Services/llamacpp-swap/Scripts/stopChat.sh
Archivo ejecutable
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Stop llama-server per DuckAi-Chat
|
||||
pkill -f "llama-server.*--port 8093"
|
||||
4
Services/llamacpp-swap/Scripts/stopCoder.sh
Archivo ejecutable
4
Services/llamacpp-swap/Scripts/stopCoder.sh
Archivo ejecutable
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Stop llama-server per DuckAi-Coder
|
||||
pkill -f "llama-server.*--port 8094"
|
||||
3
Services/llamacpp-swap/Scripts/stopCoderMedium.sh
Archivo ejecutable
3
Services/llamacpp-swap/Scripts/stopCoderMedium.sh
Archivo ejecutable
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
pkill -f "llama-server.*8095" || true
|
||||
3
Services/llamacpp-swap/Scripts/stopCoderMini.sh
Archivo ejecutable
3
Services/llamacpp-swap/Scripts/stopCoderMini.sh
Archivo ejecutable
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
pkill -f "llama-server.*8094" || true
|
||||
3
Services/llamacpp-swap/Scripts/stopCoderTop.sh
Archivo ejecutable
3
Services/llamacpp-swap/Scripts/stopCoderTop.sh
Archivo ejecutable
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
pkill -f "llama-server.*8096" || true
|
||||
4
Services/llamacpp-swap/Scripts/stopEmbedding.sh
Archivo ejecutable
4
Services/llamacpp-swap/Scripts/stopEmbedding.sh
Archivo ejecutable
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Stop llama-server per DuckAi-Embedding
|
||||
pkill -f "llama-server.*--port 8096"
|
||||
4
Services/llamacpp-swap/Scripts/stopEmbeddingFast.sh
Archivo ejecutable
4
Services/llamacpp-swap/Scripts/stopEmbeddingFast.sh
Archivo ejecutable
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Stop llama-server per DuckAi-EmbeddingFast
|
||||
pkill -f "llama-server.*--port 8095"
|
||||
3
Services/llamacpp-swap/Scripts/stopEmbeddingMedium.sh
Archivo ejecutable
3
Services/llamacpp-swap/Scripts/stopEmbeddingMedium.sh
Archivo ejecutable
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
pkill -f "llama-server.*8098" || true
|
||||
3
Services/llamacpp-swap/Scripts/stopEmbeddingMini.sh
Archivo ejecutable
3
Services/llamacpp-swap/Scripts/stopEmbeddingMini.sh
Archivo ejecutable
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
pkill -f "llama-server.*8097" || true
|
||||
3
Services/llamacpp-swap/Scripts/stopEmbeddingTop.sh
Archivo ejecutable
3
Services/llamacpp-swap/Scripts/stopEmbeddingTop.sh
Archivo ejecutable
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
pkill -f "llama-server.*8099" || true
|
||||
4
Services/llamacpp-swap/Scripts/stopGeneral.sh
Archivo ejecutable
4
Services/llamacpp-swap/Scripts/stopGeneral.sh
Archivo ejecutable
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Stop llama-server per DuckAi-General
|
||||
pkill -f "llama-server.*--port 8092"
|
||||
4
Services/llamacpp-swap/Scripts/stopGeneralFast.sh
Archivo ejecutable
4
Services/llamacpp-swap/Scripts/stopGeneralFast.sh
Archivo ejecutable
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Stop llama-server per DuckAi-GeneralFast
|
||||
pkill -f "llama-server.*--port 8091"
|
||||
Referencia en una nueva incidencia
Block a user