Skip to content

Running chat app on m2 iPad Pro with mistral 7B unable to generate text #24

@developer-yl

Description

@developer-yl

Running iOS 18.0 beta 6 on m2 iPad Pro and m1 max Mac is running 14.6.1 but running XCode 16.0 beta 5 (swit-transformers preview 45e5fbb, CompactSlider 1.1.6, Path.swift 1.4.1, swift-argument-parser 1.5.0)

I have downloaded the https://huggingface.co/apple/mistral-coreml mistral 7B coreml model
I am running the chat app in the preview branch, it is able to load the model in the iPad fine but it gives an error when I press the top right play button to generate text with the default "Write a poem about Valencia"

When starting app:

The model is not found at URL: file:///var/mobile/Containers/Data/Application/A12F6050-340D-48D8-973D-851121212F36/Library/Application%20Support/hf-compiled-transformers/StatefulMistral7BInstructInt4.mlmodelc
No model could be loaded: Error Domain=com.apple.CoreML Code=0 "The model is not found at URL: file:///var/mobile/Containers/Data/Application/A12F6050-340D-48D8-973D-851121212F36/Library/Application%20Support/hf-compiled-transformers/StatefulMistral7BInstructInt4.mlmodelc" UserInfo={NSLocalizedDescription=The model is not found at URL: file:///var/mobile/Containers/Data/Application/A12F6050-340D-48D8-973D-851121212F36/Library/Application%20Support/hf-compiled-transformers/StatefulMistral7BInstructInt4.mlmodelc}
NSBundle file:///System/Library/PrivateFrameworks/MetalTools.framework/ principal class is nil because all fallbacks have failed
Failed to send CA Event for app launch measurements for ca_event_type: 1 event_name: com.apple.app_launch_measurement.ExtendedLaunchMetrics

When loading the model:

Compiling model file:///private/var/mobile/Library/Mobile%20Documents/comappleCloudDocs/Downloads/StatefulMistral7BInstructInt4.mlpackage
The view service did terminate with error: Error Domain=_UIViewServiceErrorDomain Code=1 "(null)" UserInfo={Terminated=disconnect method}
loc("/var/mobile/Containers/Data/Application/A12F6050-340D-48D8-973D-851121212F36/Library/Caches/com.testmodel/com.apple.e5rt.e5bundlecache/22A5338b/AAE089F8CD4E605BA9D6F96BF8073D646BC469AEFEA3D60CB0B2F4F18D462764/1A37B336B2CBAE9955E761EC42C04E24E7FE93A1583CBB9B222612B5C9D2C73D.bundle/H14G.bundle/main/main_mps_graph/main_mps_graph.mpsgraphpackage/model_0.mpsgraph":0:0): error: attempting to parse a byte at the end of the bytecode

When pressing the play button:

Error Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0." UserInfo={NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0., NSJSONSerializationErrorIndex=0}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions