Instructions to use itismejk/recycle-vlm-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use itismejk/recycle-vlm-lora 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("itismejk/recycle-vlm-lora") config = load_config("itismejk/recycle-vlm-lora") # 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
๊ฐ์ ์์ (before/after)
- ๋ฒ ์ด์ค: "HDPE๋ ์ผ๋ฐ ์ฐ๋ ๊ธฐ์ ํจ๊ป ๋ฒ๋ฆด ์ ์์ต๋๋ค" (์ค๋ฅ)
- ์ด๋ํฐ: "์ผ๋ฐ ์ฐ๋ ๊ธฐ์ ํจ๊ป ๋ฒ๋ฆฌ์ง ์๊ณ , ํ๋ผ์คํฑ ์ฌํ์ฉ ์๊ฑฐํจ์ ๋ฃ์ด์ฃผ์ธ์" (์์ )
iOS ์จ๋๋ฐ์ด์ค
๋จ์ผ ๋ชจ๋ธ์ด ํ์ํ๋ฉด fp ๋ฒ ์ด์ค์ ๋ณํฉ(fuse) ํ 4bit ๋ณํํด HF์ ์ฌ๋ฆฌ๊ณ ,
MLX Swift(ml-explore/mlx-swift-lm, MLXVLM)์์ ModelConfiguration(id: ...)๋ก ๋ก๋.
์ค๊ธฐ๊ธฐ ์ ์ฉ, Increased Memory Limit ํ์.
ํ๊ณ / ์ฃผ์
- ์๊ท๋ชจ ๋ฐ์ดํฐ๋ก ํ์ธํ๋๋ ๋ฐ๋ชจ์ฉ ๋ชจ๋ธ. ์ง์ญ๋ณ ๋ถ๋ฆฌ๋ฐฐ์ถ ๊ท์ ์ฐจ์ด๋ ๋ฐ์ํ์ง ๋ชปํ ์ ์์.
- ๋ถ๋ฆฌ๋ฐฐ์ถ ์๋ด๋ ์ฐธ๊ณ ์ฉ์ด๋ฉฐ, ์ง์์ฒด ๊ธฐ์ค์ด ์ฐ์ .
- ๋ผ์ด์ ์ค: Gemma Terms of Use ์ค์.
Hardware compatibility
Log In to add your hardware
Quantized
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support