Image-Text-to-Text
MLX
Safetensors
Korean
gemma3
vision-language-model
korean
recycling
conversational
4-bit precision
Instructions to use milomiso/recycle-vlm-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use milomiso/recycle-vlm-4bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("milomiso/recycle-vlm-4bit") config = load_config("milomiso/recycle-vlm-4bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
recycle-gemma-3-4b (Korean Recycling Mark Guide)
ํ๊ตญ ๋ถ๋ฆฌ๋ฐฐ์ถ(์ฌํ์ฉ) ๋งํฌ ์ฌ์ง์ ๋ณด๊ณ ์ฌ๋ฐ๋ฅธ ๋ถ๋ฆฌ๋ฐฐ์ถ ๋ฐฉ๋ฒ์ ํ๊ตญ์ด๋ก ์๋ดํ๋๋ก
google/gemma-3-4b-it๋ฅผ LoRA(QLoRA)๋ก ํ์ธํ๋ํ ์จ๋๋ฐ์ด์ค VLM.
- Base:
mlx-community/gemma-3-4b-it-qat-4bit(Gemma 3 4B IT, QAT 4bit) - Architecture:
gemma3(๋ณ๊ฒฝ ์์ โ mlx-swift-lm VLM ๋ก๋ ๊ทธ๋๋ก ํธํ) - Method: mlx-vlm QLoRA, ๋น์ ํ์ ๋๊ฒฐ(์ธ์ด ๋ ์ด์ด LoRA๋ง)
- Data: ํ๊ตญ ๋ถ๋ฆฌ๋ฐฐ์ถ ๋งํฌ ์ฌ์ง + ํ๊ตญ์ด ๋ฐฐ์ถ ์๋ด (์๊ท๋ชจ, ์์ฒด ๊ตฌ์ถ)
- Runtime: MLX Swift๋ก iPhone(iOS 17+) ์จ๋๋ฐ์ด์ค ์คํ
์ด repo๋ LoRA ์ด๋ํฐ์ ๋๋ค(๋ฒ ์ด์ค์ ์น์ด ์ฌ์ฉ). ๋น์ ํ์๋ ๋๊ฒฐ, ์ธ์ด ๋ ์ด์ด๋ง ํ์ต.
์ฌ์ฉ (MLX, ์ด๋ํฐ)
python -m mlx_vlm.generate \
--model mlx-community/gemma-3-4b-it-qat-4bit \
--adapter-path <this-repo> \
--image bottle.jpg \
--prompt "์ด ํ๊ตญ ๋ถ๋ฆฌ๋ฐฐ์ถ ๋งํฌ๋ฅผ ์ธ์ํ๊ณ , ๋ถ๋ฆฌ๋ฐฐ์ถ ๋ฐฉ๋ฒ์ ํ๊ตญ์ด๋ก ๋จ๊ณ๋ณ๋ก ์๋ ค์ค." \
--max-tokens 300 --repetition-penalty 1.1
ํ์ฌ ์ํ (v0 ยท ์ด๊ธฐ ๋ฐ๋ชจ)
- ์๊ท๋ชจ ๋ฐ์ดํฐ๋ก ํ์ตํ ์ด๊ธฐ ๋ฐ๋ชจ ๋ฒ์ ์ ๋๋ค.
- ์์ฒด ๊ฒ์ฆ ๊ฒฐ๊ณผ, ์ฌํ์ฉ ๋งํฌ์ ์ฌ์ง ์๋ ์ธ์ ์ ํ๋๊ฐ ์์ง ๋ฎ์ต๋๋ค (ํนํ ๋น๋/๋ณตํฉ์ฌ์ง/'์ฌํ์ฉ ์ด๋ ค์'). ๋ฐ์ดํฐ ํ๋ ํ ์ฌํ์ต์ผ๋ก ๊ฐ์ ์์ ์ ๋๋ค.
- ์ฑ(์จ๋๋ฐ์ด์ค)์์๋ ๋ชจ๋ธ์ ์ฌ์ง ์ธ์์ ์ฌ์ฉ์๊ฐ ์์ ํ ์ ์๊ณ , ๋ฐฐ์ถ ๋ฐฉ๋ฒ์ (์ฌ์ง ร ์ค์ผ๋) ๊ท์น์ผ๋ก ๋ณด์ ํด ์๋ดํฉ๋๋ค.
iOS ์จ๋๋ฐ์ด์ค
๋จ์ผ ๋ชจ๋ธ์ด ํ์ํ๋ฉด fp ๋ฒ ์ด์ค์ ๋ณํฉ(fuse) ํ 4bit ๋ณํํด HF์ ์ฌ๋ฆฌ๊ณ ,
MLX Swift(ml-explore/mlx-swift-lm, MLXVLM)์์ ModelConfiguration(id: ...)๋ก ๋ก๋.
์ค๊ธฐ๊ธฐ ์ ์ฉ, Increased Memory Limit ํ์.
ํ๊ณ / ์ฃผ์
- ์๊ท๋ชจ ๋ฐ์ดํฐ๋ก ํ์ธํ๋๋ ๋ฐ๋ชจ์ฉ ๋ชจ๋ธ. ์ง์ญ๋ณ ๋ถ๋ฆฌ๋ฐฐ์ถ ๊ท์ ์ฐจ์ด๋ ๋ฐ์ํ์ง ๋ชปํ ์ ์์.
- ๋ถ๋ฆฌ๋ฐฐ์ถ ์๋ด๋ ์ฐธ๊ณ ์ฉ์ด๋ฉฐ, ์ง์์ฒด ๊ธฐ์ค์ด ์ฐ์ .
- ๋ผ์ด์ ์ค: Gemma Terms of Use ์ค์.
- Downloads last month
- 23
Model size
1B params
Tensor type
BF16
ยท
U32 ยท
Hardware compatibility
Log In to add your hardware
4-bit