Instructions to use RE-N-Y/logic2vision with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RE-N-Y/logic2vision with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="RE-N-Y/logic2vision")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("RE-N-Y/logic2vision") model = AutoModelForMultimodalLM.from_pretrained("RE-N-Y/logic2vision", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RE-N-Y/logic2vision with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RE-N-Y/logic2vision" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RE-N-Y/logic2vision", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/RE-N-Y/logic2vision
- SGLang
How to use RE-N-Y/logic2vision with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "RE-N-Y/logic2vision" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RE-N-Y/logic2vision", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "RE-N-Y/logic2vision" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RE-N-Y/logic2vision", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use RE-N-Y/logic2vision with Docker Model Runner:
docker model run hf.co/RE-N-Y/logic2vision
Upload processor
Browse filesFiles changed (4)
- preprocessor_config.jsonAdded+28
- special_tokens_map.jsonAdded+24
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+59
12345678910111213141516171819202122232425262728{ "crop_size": { "height": 336, "width": 336 }, "do_center_crop": true, "do_convert_rgb": true, "do_normalize": true, "do_rescale": true, "do_resize": true, "image_mean": [ 0.48145466, 0.4578275, 0.40821073 ], "image_processor_type": "CLIPImageProcessor", "image_std": [ 0.26862954, 0.26130258, 0.27577711 ], "processor_class": "LlavaProcessor", "resample": 3, "rescale_factor": 0.00392156862745098, "size": { "shortest_edge": 336 }}123456789101112131415161718192021222324{ "bos_token": { "content": "<s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "eos_token": { "content": "</s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "pad_token": "</s>", "unk_token": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859{ "add_bos_token": true, "add_eos_token": false, "added_tokens_decoder": { "0": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "1": { "content": "<s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "2": { "content": "</s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32000": { "content": "<image>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32001": { "content": "<pad>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "bos_token": "<s>", "clean_up_tokenization_spaces": false, "eos_token": "</s>", "legacy": false, "model_max_length": 1000000000000000019884624838656, "pad_token": "</s>", "padding_side": "left", "processor_class": "LlavaProcessor", "sp_model_kwargs": {}, "tokenizer_class": "LlamaTokenizer", "trust_remote_code": false, "unk_token": "<unk>", "use_default_system_prompt": false}preprocessor_config.jsonAdded+28
special_tokens_map.jsonAdded+24
tokenizer.jsonAdded
tokenizer_config.jsonAdded+59