@@ -166,10 +166,6 @@ describe("utils", () => {
166166 "hf_mradermacher_Meta-Llama-3.1-8B-Instruct.Q4_K_M.gguf",
167167 "hf_mradermacher_Meta-Llama-3.1-8B-Instruct.Q4_K_M-00001-of-{:
168168 {number}
169- :}.gguf",
170- "hf_mradermacher_Meta-Llama-3.1-8B-Instruct.gguf",
171- "hf_mradermacher_Meta-Llama-3.1-8B-Instruct-00001-of-{:
172- {number}
173169 :}.gguf",
174170 ],
175171 "resolveDetails": {
@@ -207,10 +203,6 @@ describe("utils", () => {
207203 "hf_mradermacher_Meta-Llama-3.1-8B-Instruct.Q4_K_M.gguf",
208204 "hf_mradermacher_Meta-Llama-3.1-8B-Instruct.Q4_K_M-00001-of-{:
209205 {number}
210- :}.gguf",
211- "hf_mradermacher_Meta-Llama-3.1-8B-Instruct.gguf",
212- "hf_mradermacher_Meta-Llama-3.1-8B-Instruct-00001-of-{:
213- {number}
214206 :}.gguf",
215207 ],
216208 "resolveDetails": {
@@ -245,12 +237,8 @@ describe("utils", () => {
245237 "baseFilename": "Meta-Llama-3.1-70B-Instruct",
246238 "filePrefix": "hf_bartowski_",
247239 "possibleFullFilenames": [
248- "hf_bartowski_Meta-Llama-3.1-70B-Instruct.Q4_K_M.gguf",
249- "hf_bartowski_Meta-Llama-3.1-70B-Instruct.Q4_K_M-00001-of-{:
250- {number}
251- :}.gguf",
252- "hf_bartowski_Meta-Llama-3.1-70B-Instruct.gguf",
253- "hf_bartowski_Meta-Llama-3.1-70B-Instruct-00001-of-{:
240+ "hf_bartowski_Meta-Llama-3.1-70B-Instruct.Q5_K_L.gguf",
241+ "hf_bartowski_Meta-Llama-3.1-70B-Instruct.Q5_K_L-00001-of-{:
254242 {number}
255243 :}.gguf",
256244 ],
@@ -327,12 +315,8 @@ describe("utils", () => {
327315 "baseFilename": "Meta-Llama-3.1-70B-Instruct",
328316 "filePrefix": "hf_mradermacher_",
329317 "possibleFullFilenames": [
330- "hf_mradermacher_Meta-Llama-3.1-70B-Instruct.Q4_K_M.gguf",
331- "hf_mradermacher_Meta-Llama-3.1-70B-Instruct.Q4_K_M-00001-of-{:
332- {number}
333- :}.gguf",
334- "hf_mradermacher_Meta-Llama-3.1-70B-Instruct.gguf",
335- "hf_mradermacher_Meta-Llama-3.1-70B-Instruct-00001-of-{:
318+ "hf_mradermacher_Meta-Llama-3.1-70B-Instruct.Q8_0.gguf",
319+ "hf_mradermacher_Meta-Llama-3.1-70B-Instruct.Q8_0-00001-of-{:
336320 {number}
337321 :}.gguf",
338322 ],
@@ -354,5 +338,37 @@ describe("utils", () => {
354338 expect ( err ) . toMatchInlineSnapshot ( '[Error: Cannot get quantization "Q8_0" for model "hf:mradermacher/Meta-Llama-3.1-70B-Instruct-GGUF" or it does not exist]' ) ;
355339 }
356340 } ) ;
341+
342+ test ( "Hugging Face simple URI is resolved 5" , async ( ) => {
343+ const parsedModelUri = parseModelUri ( "hf:mradermacher/Meta-Llama-3.1-70B-Instruct-GGUF:invalid" ) ;
344+
345+ expect ( parsedModelUri ) . toMatchInlineSnapshot ( `
346+ {
347+ "baseFilename": "Meta-Llama-3.1-70B-Instruct",
348+ "filePrefix": "hf_mradermacher_",
349+ "possibleFullFilenames": [
350+ "hf_mradermacher_Meta-Llama-3.1-70B-Instruct.INVALID.gguf",
351+ "hf_mradermacher_Meta-Llama-3.1-70B-Instruct.INVALID-00001-of-{:
352+ {number}
353+ :}.gguf",
354+ ],
355+ "resolveDetails": {
356+ "model": "Meta-Llama-3.1-70B-Instruct-GGUF",
357+ "tag": "invalid",
358+ "type": "hf",
359+ "user": "mradermacher",
360+ },
361+ "type": "unresolved",
362+ "uri": "hf:mradermacher/Meta-Llama-3.1-70B-Instruct-GGUF:invalid",
363+ }
364+ ` ) ;
365+
366+ try {
367+ await resolveParsedModelUri ( parsedModelUri ) ;
368+ expect . unreachable ( "This quantization cannot be resolved due to not existing" ) ;
369+ } catch ( err ) {
370+ expect ( err ) . toMatchInlineSnapshot ( '[Error: Cannot get quantization "invalid" for model "hf:mradermacher/Meta-Llama-3.1-70B-Instruct-GGUF" or it does not exist]' ) ;
371+ }
372+ } ) ;
357373 } ) ;
358374} ) ;
0 commit comments