@@ -67,10 +67,14 @@ describe("llama 3.1", () => {
6767 ` ) ;
6868 } ) ;
6969
70- test ( "with probabilities" , { timeout : 1000 * 60 * 60 * 2 } , async ( ) => {
70+ test ( "with probabilities" , { timeout : 1000 * 60 * 60 * 2 } , async ( testContext ) => {
7171 const modelPath = await getModelFile ( "Meta-Llama-3.1-8B-Instruct.Q4_K_M.gguf" ) ;
7272 const llama = await getTestLlama ( ) ;
7373
74+ // the precise values are different for each GPU type, so we skip the test for GPUs other than metal
75+ if ( llama . gpu !== "metal" )
76+ testContext . skip ( ) ;
77+
7478 const model = await llama . loadModel ( {
7579 modelPath
7680 } ) ;
@@ -246,10 +250,14 @@ describe("llama 3.1", () => {
246250 ` ) ;
247251 } ) ;
248252
249- test ( "with confidence" , { timeout : 1000 * 60 * 60 * 2 } , async ( ) => {
253+ test ( "with confidence" , { timeout : 1000 * 60 * 60 * 2 } , async ( testContext ) => {
250254 const modelPath = await getModelFile ( "Meta-Llama-3.1-8B-Instruct.Q4_K_M.gguf" ) ;
251255 const llama = await getTestLlama ( ) ;
252256
257+ // the precise values are different for each GPU type, so we skip the test for GPUs other than metal
258+ if ( llama . gpu !== "metal" )
259+ testContext . skip ( ) ;
260+
253261 const model = await llama . loadModel ( {
254262 modelPath
255263 } ) ;
@@ -315,10 +323,14 @@ describe("llama 3.1", () => {
315323 ` ) ;
316324 } ) ;
317325
318- test ( "with probabilities and confidence" , { timeout : 1000 * 60 * 60 * 2 } , async ( ) => {
326+ test ( "with probabilities and confidence" , { timeout : 1000 * 60 * 60 * 2 } , async ( testContext ) => {
319327 const modelPath = await getModelFile ( "Meta-Llama-3.1-8B-Instruct.Q4_K_M.gguf" ) ;
320328 const llama = await getTestLlama ( ) ;
321329
330+ // the precise values are different for each GPU type, so we skip the test for GPUs other than metal
331+ if ( llama . gpu !== "metal" )
332+ testContext . skip ( ) ;
333+
322334 const model = await llama . loadModel ( {
323335 modelPath
324336 } ) ;
@@ -504,10 +516,14 @@ describe("llama 3.1", () => {
504516 ` ) ;
505517 } ) ;
506518
507- test ( "confidence alone matches probability alone" , { timeout : 1000 * 60 * 60 * 2 } , async ( ) => {
519+ test ( "confidence alone matches probability alone" , { timeout : 1000 * 60 * 60 * 2 } , async ( testContext ) => {
508520 const modelPath = await getModelFile ( "Meta-Llama-3.1-8B-Instruct.Q4_K_M.gguf" ) ;
509521 const llama = await getTestLlama ( ) ;
510522
523+ // the precise values are different for each GPU type, so we skip the test for GPUs other than metal
524+ if ( llama . gpu !== "metal" )
525+ testContext . skip ( ) ;
526+
511527 const model = await llama . loadModel ( {
512528 modelPath
513529 } ) ;
0 commit comments