Is there any similar solution to enable this option for 8gb Macs?
I suppose it is optional like TPM in windows
Great idea! I'll take a look at that.
Have you tried this?
defaults write -app Xcode IDEModelAccessOnDeviceAvailabilityOverride ready
Update: this will only affect Xcode settings UI and won't make Xcode LLM run. I'm still investigating how to patch.
👀 I'm looking forward to it!
We can attach to Xcode:
lldb /Applications/Xcode-beta.app
then set a breakpoint to ASI_PhysicalMemorySize:
b ASI_PhysicalMemorySize
each time the lldb hits the breakpoint, make it return a number higher than 16000000000:
thread return 17179869184
and then continue:
continue
Although these steps can let you turn on the switch on settings and download the model, XcodeLLM seems not working. While trying to type code, lldb console always print these messages:
2024-07-13 14:43:51.559815+0800 Xcode[52130:3238258] [guardrail] StringResponseSanitizerRunner: Could not add com.apple.gm.overrides.model_config.all to the asset cache due to error: ModelCatalog.CatalogErrors.AssetErrors.failedToFindAsset("com.apple.gm.overrides.model_config.all - no asset")
2024-07-13 14:43:51.793136+0800 Xcode[52130:3239405] [override] GenerativeModelOverride: Unable to find generative function override asset (com.apple.gm.safety.generativefunctionoverrides. Reason: com.apple.gm.safety.generativefunctionoverrides - no asset
2024-07-13 14:43:51.827062+0800 Xcode[52130:3239405] [BiomeStorage] Can't create stream folder at /Users/{Username}/Library/Biome/streams/restricted/GenerativeModels.GenerativeFunctions.Instrumentation/local with error Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named (null)" UserInfo={NSDebugDescription=connection to service named (null)}, protectionClass: BMDataProtectionClassC isUnlocked: 1
2024-07-13 14:43:51.846512+0800 Xcode[52130:3239405] [BiomeStorage] Failed to get contents of directory: <HOME>/Library/Biome/streams/restricted/GenerativeModels.GenerativeFunctions.Instrumentation/local, error: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named (null)" UserInfo={NSDebugDescription=connection to service named (null)}
Hi.
Since Xcode 16 Beta 4, Predictive Code Completion is available for 8GB Macs.
https://developer.apple.com/documentation/xcode-release-notes/xcode-16-release-notes
For China SKU Macs, a hack is still needed.
@WindowsMEMZ I believe that ASI_PhysicalMemorySize only affects Xcode settings GUI, and there is actually another routine to determine memory size inside the system private framework ModelCatalog that invokes MobileGestalt_get_deviceMemorySize. But on my machine (16GB memory) this routine never runs, and I am stuck here.