Skip to content

Commit a2363c6

Browse files
authored
Add VLMEval Sample Project (#169)
* Add VLMEval target with code
1 parent 4633727 commit a2363c6

File tree

13 files changed

+733
-11
lines changed

13 files changed

+733
-11
lines changed

Applications/LLMEval/README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ An example that:
66
- evaluates a prompt
77
- displays the output as it generates text
88

9-
> Note: this _must_ be built Release, otherwise you will encounter
10-
stack overflows.
11-
12-
You will need to set the Team on the LLMEval target in order to build and
13-
run on iOS.
9+
You will need to set the Team on the LLMEval target in order to build and run on iOS.
1410

1511
Some notes about the setup:
1612

@@ -46,9 +42,6 @@ There are a couple options:
4642
- force the model evaluation to run on the main thread, e.g. using @MainActor
4743
- build `Cmlx` with optimizations by modifying `mlx/Package.swift` and adding `.unsafeOptions(["-O3"]),` around line 87
4844

49-
Building in Release / optimizations will remove a lot of tail calls in the C++
50-
layer. These lead to the stack overflows.
51-
5245
See discussion here: https://github.com/ml-explore/mlx-swift-examples/issues/3
5346

5447
### Performance

Applications/LLMEval/ViewModels/DeviceStat.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import Foundation
22
import MLX
3-
import MLXLLM
43

54
@Observable
65
final class DeviceStat: @unchecked Sendable {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"colors" : [
3+
{
4+
"idiom" : "universal"
5+
}
6+
],
7+
"info" : {
8+
"author" : "xcode",
9+
"version" : 1
10+
}
11+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"platform" : "ios",
6+
"size" : "1024x1024"
7+
},
8+
{
9+
"appearances" : [
10+
{
11+
"appearance" : "luminosity",
12+
"value" : "dark"
13+
}
14+
],
15+
"idiom" : "universal",
16+
"platform" : "ios",
17+
"size" : "1024x1024"
18+
},
19+
{
20+
"appearances" : [
21+
{
22+
"appearance" : "luminosity",
23+
"value" : "tinted"
24+
}
25+
],
26+
"idiom" : "universal",
27+
"platform" : "ios",
28+
"size" : "1024x1024"
29+
}
30+
],
31+
"info" : {
32+
"author" : "xcode",
33+
"version" : 1
34+
}
35+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}

0 commit comments

Comments
 (0)