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
File size: 278 Bytes
cbc40c9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | {
"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,
"quantization": {
"group_size": 64,
"bits": 8,
"mode": "affine"
},
"precision": "8bit"
}
|