Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- de
|
| 5 |
+
- fr
|
| 6 |
+
- it
|
| 7 |
+
- pt
|
| 8 |
+
- hi
|
| 9 |
+
- es
|
| 10 |
+
- th
|
| 11 |
+
library_name: coreml
|
| 12 |
+
license: llama3.2
|
| 13 |
+
pipeline_tag: text-generation
|
| 14 |
+
tags:
|
| 15 |
+
- facebook
|
| 16 |
+
- meta
|
| 17 |
+
- llama
|
| 18 |
+
- llama-3
|
| 19 |
+
- CoreMLPipelines
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
# coreml-Llama-3.2-3B-Instruct-4bit
|
| 23 |
+
|
| 24 |
+
This model was converted from [meta-llama/Llama-3.2-3B-Instruct](https://hf.co/meta-llama/Llama-3.2-3B-Instruct) to CoreML using [coremlpipelinestools](https://github.com/finnvoor/CoreMLPipelines/tree/main/coremlpipelinestools).
|
| 25 |
+
|
| 26 |
+
### Use with [CoreMLPipelines](https://github.com/finnvoor/CoreMLPipelines)
|
| 27 |
+
|
| 28 |
+
```swift
|
| 29 |
+
import CoreMLPipelines
|
| 30 |
+
|
| 31 |
+
let pipeline = try await TextGenerationPipeline(
|
| 32 |
+
modelName: "finnvoorhees/coreml-Llama-3.2-3B-Instruct-4bit"
|
| 33 |
+
)
|
| 34 |
+
let stream = pipeline(
|
| 35 |
+
messages: [[
|
| 36 |
+
"role": "user",
|
| 37 |
+
"content": "Write a poem about Ireland"
|
| 38 |
+
]]
|
| 39 |
+
)
|
| 40 |
+
for try await text in stream {
|
| 41 |
+
print(text, terminator: "")
|
| 42 |
+
fflush(stdout)
|
| 43 |
+
}
|
| 44 |
+
print("")
|
| 45 |
+
```
|
| 46 |
+
|