Skip to content

Commit e2c5c3f

Browse files
authored
fix: embedding context deadlock (#402)
1 parent 6a54163 commit e2c5c3f

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ jobs:
2323
- name: Download latest llama.cpp release
2424
env:
2525
CI: true
26-
run: node ./dist/cli/cli.js source download --release latest --skipBuild --noBundle --noUsageExample --updateBinariesReleaseMetadataAndSaveGitBundle
26+
# pinned to `b4291` temporarily until the Windows on Arm64 build is fixed
27+
run: node ./dist/cli/cli.js source download --release b4291 --skipBuild --noBundle --noUsageExample --updateBinariesReleaseMetadataAndSaveGitBundle
2728
- name: Upload build artifact
2829
uses: actions/upload-artifact@v4
2930
with:

src/evaluator/LlamaModel/LlamaModel.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -517,14 +517,7 @@ export class LlamaModel {
517517
if (this._vocabOnly)
518518
throw new Error("Model is loaded in vocabOnly mode, so no context can be created");
519519

520-
return await withLock(this._llama._memoryLock, LlamaLocks.loadToMemory, options.createSignal, async () => {
521-
const preventDisposalHandle = this._backendModelDisposeGuard.createPreventDisposalHandle();
522-
try {
523-
return await LlamaEmbeddingContext._create({_model: this}, options);
524-
} finally {
525-
preventDisposalHandle.dispose();
526-
}
527-
});
520+
return await LlamaEmbeddingContext._create({_model: this}, options);
528521
}
529522

530523
/**

0 commit comments

Comments
 (0)