ahishamm commited on
Commit
3258a11
·
verified ·
1 Parent(s): 0c68b98

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +30 -0
README.md ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ language:
5
+ - en
6
+ base_model: ds4sd/SmolDocling-256M-preview
7
+ pipeline_tag: image-text-to-text
8
+ tags:
9
+ - mlx
10
+ ---
11
+
12
+ # ahishamm/SmolDocling-256M-preview-mlx-fp16
13
+ The Model [ahishamm/SmolDocling-256M-preview-mlx-fp16](https://huggingface.co/ahishamm/SmolDocling-256M-preview-mlx-fp16) was converted to MLX format from [ds4sd/SmolDocling-256M-preview](https://huggingface.co/ds4sd/SmolDocling-256M-preview)
14
+ using mlx-lm version **unknown**.
15
+
16
+ ## Use with mlx
17
+ ```bash
18
+ pip install mlx-lm
19
+ ```
20
+ ```python
21
+ from mlx_lm import load, generate
22
+ model, tokenizer = load("ahishamm/SmolDocling-256M-preview-mlx-fp16")
23
+ prompt = "hello"
24
+ if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
25
+ messages = [{"role": "user", "content": prompt}]
26
+ prompt = tokenizer.apply_chat_template(
27
+ messages, tokenize=False, add_generation_prompt=True
28
+ )
29
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
30
+ ```