Closed allnash closed 1 month ago
@allnash, can you share your MacOS and CoreML versions:
To get macOS from CLI:
sw_vers
For CoreML:
plutil -p /System/Library/Frameworks/CoreML.framework/Resources/Info.plist
@allnash, can you try this and let me know if it works for you:
from chromadb.utils.embedding_functions.onnx_mini_lm_l6_v2 import ONNXMiniLM_L6_V2
ef = ONNXMiniLM_L6_V2(preferred_providers=["CPUExecutionProvider"])
# rest of your code
collection = client.get_or_create_collection("<collection_name", embedding_function=ef)
collection.add(
documents=[article["content"] for article in batch],
metadatas=[article["metadata"] for article in batch],
ids=[f"{scraper.name}_{j}" for j in range(i, i + len(batch))]
)
I suspect I have encountered the same issue. After using ONNXMiniLM_L6_V2(preferred_providers=["CPUExecutionProvider"])
it worked.
My result of sw_vers
ProductName: macOS
ProductVersion: 13.6.9
BuildVersion: 22G830
and result of CoreML:
{
"BuildMachineOSBuild" => "22A380017"
"CFBundleDevelopmentRegion" => "en"
"CFBundleExecutable" => "CoreML"
"CFBundleIdentifier" => "com.apple.CoreML"
"CFBundleInfoDictionaryVersion" => "6.0"
"CFBundleName" => "CoreML"
"CFBundlePackageType" => "FMWK"
"CFBundleShortVersionString" => "1.0"
"CFBundleSupportedPlatforms" => [
0 => "MacOSX"
]
"CFBundleVersion" => "1436.140.3.0.1"
"DTCompiler" => "com.apple.compilers.llvm.clang.1_0"
"DTPlatformBuild" => "22G417"
"DTPlatformName" => "macosx"
"DTPlatformVersion" => "13.6"
"DTSDKBuild" => "22G417"
"DTSDKName" => "macosx13.6.internal"
"DTXcode" => "1430"
"DTXcodeBuild" => "14E6097d"
"LSMinimumSystemVersion" => "13.6"
}
@allnash, did using CPUExecutionProvider
provider solve your issue too?
closing this, but @allnash would love to know the resolution!
Sorry for being MIA, yes it did solve it. Just tried this am
What happened?
Versions
0.5.5
Relevant log output