Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
coderai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
coderai
Commits
34648b9b
Commit
34648b9b
authored
Mar 16, 2026
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Remove hash prefix from cached GGUF filenames when extracting model name
parent
13e81d0d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
coderai
coderai
+6
-0
No files found.
coderai
View file @
34648b9b
...
@@ -1421,7 +1421,13 @@ class VulkanBackend(ModelBackend):
...
@@ -1421,7 +1421,13 @@ class VulkanBackend(ModelBackend):
# Try to infer model name from file name
# Try to infer model name from file name
# Common patterns: llama-3.1-8b-instruct-q4_k_m.gguf -> llama-3.1-8b-instruct
# Common patterns: llama-3.1-8b-instruct-q4_k_m.gguf -> llama-3.1-8b-instruct
# Also handle cached files with hash prefix: hash_modelname.gguf -> modelname
model_base = model_file.replace('
.
gguf
', '')
model_base = model_file.replace('
.
gguf
', '')
# Remove hash prefix (40 hex chars followed by underscore)
import re
model_base = re.sub(r'
^[
0
-
9
a
-
f
]{
40
}
_
', '', model_base)
# Remove common quantization suffixes
# Remove common quantization suffixes
for suffix in ['
_q4_k_m
', '
_q4_k
', '
_q5_k
', '
_q5_k_m
', '
_q8_0
', '
_f16
', '
_q4_0
', '
_q3_k_m
', '
_q2_k
']:
for suffix in ['
_q4_k_m
', '
_q4_k
', '
_q5_k
', '
_q5_k_m
', '
_q8_0
', '
_f16
', '
_q4_0
', '
_q3_k_m
', '
_q2_k
']:
model_base = model_base.replace(suffix, '')
model_base = model_base.replace(suffix, '')
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment