feat: replace dtype with clearer precision parameter for model selection
- Changed confusing 'dtype' to 'precision' for model variant selection - Fixed Q8 quantized model loading in transformers.js pipeline - Added proper model file detection for q8 vs fp32 models - Updated all references across codebase to use new parameter - Maintains backward compatibility while providing clearer API
This commit is contained in:
parent
32df3ee6ae
commit
2a080aca55
5 changed files with 52 additions and 19 deletions
|
|
@ -113,7 +113,7 @@ export class LightweightEmbedder {
|
|||
console.log('⚠️ Loading ONNX model for complex text...')
|
||||
const { TransformerEmbedding } = await import('../utils/embedding.js')
|
||||
this.onnxEmbedder = new TransformerEmbedding({
|
||||
dtype: 'fp32',
|
||||
precision: 'fp32',
|
||||
verbose: false
|
||||
})
|
||||
await this.onnxEmbedder.init()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue