refactor(terminal): filter models by coding type
Change opencode and pi model filtering to use 'coding' type instead of more generic 'text-generation' type. Update llama-swap model configs to include 'coding' in metadata type list for relevant models (deepseek-coder, qwen-coder, mistral, codellama, llama3-8b-instruct-q5).
This commit is contained in:
@@ -14,11 +14,9 @@ in
|
|||||||
toOpencodeModels =
|
toOpencodeModels =
|
||||||
llamaSwapConfig:
|
llamaSwapConfig:
|
||||||
let
|
let
|
||||||
textGenModels = filterAttrs
|
textGenModels = filterAttrs (name: model: any (t: t == "coding") (model.metadata.type or [ ])) (
|
||||||
(
|
llamaSwapConfig.models or { }
|
||||||
name: model: any (t: t == "text-generation") (model.metadata.type or [ ])
|
);
|
||||||
)
|
|
||||||
(llamaSwapConfig.models or { });
|
|
||||||
|
|
||||||
localModels = mapAttrs
|
localModels = mapAttrs
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -13,11 +13,9 @@ in
|
|||||||
toPiModels =
|
toPiModels =
|
||||||
llamaSwapConfig:
|
llamaSwapConfig:
|
||||||
let
|
let
|
||||||
textGenModels = filterAttrs
|
textGenModels = filterAttrs (name: model: any (t: t == "coding") (model.metadata.type or [ ])) (
|
||||||
(
|
llamaSwapConfig.models or { }
|
||||||
name: model: any (t: t == "text-generation") (model.metadata.type or [ ])
|
);
|
||||||
)
|
|
||||||
(llamaSwapConfig.models or { });
|
|
||||||
|
|
||||||
localModels = mapAttrs
|
localModels = mapAttrs
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -29,7 +29,10 @@ in
|
|||||||
-dev CUDA0
|
-dev CUDA0
|
||||||
'';
|
'';
|
||||||
metadata = {
|
metadata = {
|
||||||
type = [ "text-generation" ];
|
type = [
|
||||||
|
"text-generation"
|
||||||
|
"coding"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
env = [ "GGML_CUDA_ENABLE_UNIFIED_MEMORY=1" ];
|
env = [ "GGML_CUDA_ENABLE_UNIFIED_MEMORY=1" ];
|
||||||
};
|
};
|
||||||
@@ -56,7 +59,10 @@ in
|
|||||||
-dev CUDA0
|
-dev CUDA0
|
||||||
'';
|
'';
|
||||||
metadata = {
|
metadata = {
|
||||||
type = [ "text-generation" ];
|
type = [
|
||||||
|
"text-generation"
|
||||||
|
"coding"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
env = [ "GGML_CUDA_ENABLE_UNIFIED_MEMORY=1" ];
|
env = [ "GGML_CUDA_ENABLE_UNIFIED_MEMORY=1" ];
|
||||||
};
|
};
|
||||||
@@ -142,7 +148,10 @@ in
|
|||||||
-fit off
|
-fit off
|
||||||
'';
|
'';
|
||||||
metadata = {
|
metadata = {
|
||||||
type = [ "text-generation" ];
|
type = [
|
||||||
|
"text-generation"
|
||||||
|
"coding"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
env = [ "GGML_CUDA_ENABLE_UNIFIED_MEMORY=1" ];
|
env = [ "GGML_CUDA_ENABLE_UNIFIED_MEMORY=1" ];
|
||||||
};
|
};
|
||||||
@@ -165,7 +174,10 @@ in
|
|||||||
-fit off
|
-fit off
|
||||||
'';
|
'';
|
||||||
metadata = {
|
metadata = {
|
||||||
type = [ "text-generation" ];
|
type = [
|
||||||
|
"text-generation"
|
||||||
|
"coding"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
env = [ "GGML_CUDA_ENABLE_UNIFIED_MEMORY=1" ];
|
env = [ "GGML_CUDA_ENABLE_UNIFIED_MEMORY=1" ];
|
||||||
};
|
};
|
||||||
@@ -216,7 +228,10 @@ in
|
|||||||
-fit off
|
-fit off
|
||||||
'';
|
'';
|
||||||
metadata = {
|
metadata = {
|
||||||
type = [ "text-generation" ];
|
type = [
|
||||||
|
"text-generation"
|
||||||
|
"coding"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
env = [ "GGML_CUDA_ENABLE_UNIFIED_MEMORY=1" ];
|
env = [ "GGML_CUDA_ENABLE_UNIFIED_MEMORY=1" ];
|
||||||
};
|
};
|
||||||
@@ -261,7 +276,10 @@ in
|
|||||||
-fit off
|
-fit off
|
||||||
'';
|
'';
|
||||||
metadata = {
|
metadata = {
|
||||||
type = [ "text-generation" ];
|
type = [
|
||||||
|
"text-generation"
|
||||||
|
"coding"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
env = [ "GGML_CUDA_ENABLE_UNIFIED_MEMORY=1" ];
|
env = [ "GGML_CUDA_ENABLE_UNIFIED_MEMORY=1" ];
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user