Using custom models.ini in llama.app #26667
Replies: 2 comments
|
That file isn't a config file — it's a build artifact. llama.app regenerates it from its own state, so any hand edit is overwritten the next time the app touches it. Deleting Application Support and reinstalling doesn't help because nothing is being restored; the file is being recreated. The app writes it in @discardableResult
func updateModelsFile() -> Bool {
let content = generateModelsFileContent()
let destinationURL = UserSettings.appSupportDir.appendingPathComponent("models.ini")
// Skip write if content is identical
if let existingData = try? Data(contentsOf: destinationURL),
let existingContent = String(data: existingData, encoding: .utf8),
existingContent == content
{ return false }
try content.write(to: destinationURL, atomically: true, encoding: .utf8)
...
content += "[\(model.id)]\n"
content += "model = \(modelPath)\n"
content += "ctx-size = \(tier.rawValue)\n"
if let mmprojPath { content += "mmproj = \(mmprojPath)\n" }
// spec-type / spec-draft-model / spec-draft-n-max when an MTP head is detected
if useLargeBatch { content += "ubatch-size = 2048\n" }There's no merge step and no hook for extra keys, so everything else in your file — For reference, the app then hands that path to the server as a preset ( let presetsPath = UserSettings.appSupportDir.appendingPathComponent("models.ini").path
...
"--models-preset", presetsPath,So the answer to "is there a way to use my models.ini with llama.app" is no — not through the app. But llama-server --models-preset ~/models.iniThat gets you the full preset surface, including everything the app's generator doesn't emit. The app's own CLI setup installs the same Two things about your file while you're at it:
If you want the app itself to respect a user-supplied preset, that'd be a feature request on ggml-org/Llama-macOS — the generator would need an "append user overrides" step, since today it owns the file end to end. |
|
Thanks for the response. I am aware of the llama-server flag as I am using it currently. I removed the extra spec declarations (didn't realize that they were there). I took a look at the macOS repo and I saw an issue regarding adding more cli arguments #71. My problem seems to be another angle to this so I will open a discussion there. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I am using llama.cpp (b10282-a035a8887) compiled from source on my Mac. I have a custom models.ini file defined below.
I wanted to try out llama.app on my system and downloaded the binary for mac os. The ini file for llama.app is located at
Library/Application Support/Llama/model.iniwhich had the following content.I tried replacing it with my custom file but it keeps reverting to the original file during runtime. I even tried deleting the app, the Llama folder in Application Support and the .llama-app folder in home and then reinstalling the dmg but the same issue persists.
Is there a way for me to use my models.ini file with llama.app instead of the default one?
All reactions