Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any similar solution to enable this option for 8gb Macs? #2

Open
Gargo opened this issue Jul 3, 2024 · 5 comments
Open

Is there any similar solution to enable this option for 8gb Macs? #2

Gargo opened this issue Jul 3, 2024 · 5 comments

Comments

@Gargo
Copy link

Gargo commented Jul 3, 2024

I suppose it is optional like TPM in windows

@CatMe0w
Copy link
Owner

CatMe0w commented Jul 3, 2024

Great idea! I'll take a look at that.

@CatMe0w
Copy link
Owner

CatMe0w commented Jul 3, 2024

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.

@WindowsMEMZ
Copy link

👀 I'm looking forward to it!

@WindowsMEMZ
Copy link

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)}

@CatMe0w
Copy link
Owner

CatMe0w commented Jul 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants