Instructions to use moonbox-dev/BEN2-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use moonbox-dev/BEN2-MLX with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download moonbox-dev/BEN2-MLX --local-dir BEN2-MLX
- BEN2
How to use moonbox-dev/BEN2-MLX with BEN2:
import requests from PIL import Image from ben2 import AutoModel url = "https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg" image = Image.open(requests.get(url, stream=True).raw) model = AutoModel.from_pretrained("moonbox-dev/BEN2-MLX") model.to("cuda").eval() foreground = model.inference(image) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Download bf16/config.json from moonbox-dev/BEN2-MLX: direct link, hf CLI and curl.
- Browser
- Download file 203 Bytes
-
https://huggingface.co/moonbox-dev/BEN2-MLX/resolve/main/bf16/config.json
- Command line
-
hf download hf://moonbox-dev/BEN2-MLX/bf16/config.json
-
curl -L -o config.json https://huggingface.co/moonbox-dev/BEN2-MLX/resolve/main/bf16/config.json
203 Bytes
| { | |
| "model_type": "ben2", | |
| "input_size": 1024, | |
| "embed_dim": 128, | |
| "depths": [ | |
| 2, | |
| 2, | |
| 18, | |
| 2 | |
| ], | |
| "num_heads": [ | |
| 4, | |
| 8, | |
| 16, | |
| 32 | |
| ], | |
| "window_size": 12, | |
| "emb_dim": 128, | |
| "precision": "bf16" | |
| } | |