finnvoorhees commited on
Commit
5378ef4
·
verified ·
1 Parent(s): 196b48c

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +35 -0
README.md ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ library_name: coreml
5
+ license: apache-2.0
6
+ pipeline_tag: text-generation
7
+ tags:
8
+ - CoreMLPipelines
9
+ ---
10
+
11
+ # coreml-SmolLM2-1.7B-Instruct-8bit
12
+
13
+ This model was converted from [HuggingFaceTB/SmolLM2-1.7B-Instruct](https://hf.co/HuggingFaceTB/SmolLM2-1.7B-Instruct) to CoreML using [coremlpipelinestools](https://github.com/finnvoor/CoreMLPipelines/tree/main/coremlpipelinestools).
14
+
15
+ ### Use with [CoreMLPipelines](https://github.com/finnvoor/CoreMLPipelines)
16
+
17
+ ```swift
18
+ import CoreMLPipelines
19
+
20
+ let pipeline = try await TextGenerationPipeline(
21
+ modelName: "finnvoorhees/coreml-SmolLM2-1.7B-Instruct-8bit"
22
+ )
23
+ let stream = pipeline(
24
+ messages: [[
25
+ "role": "user",
26
+ "content": "Write a poem about Ireland"
27
+ ]]
28
+ )
29
+ for try await text in stream {
30
+ print(text, terminator: "")
31
+ fflush(stdout)
32
+ }
33
+ print("")
34
+ ```
35
+