Image-Text-to-Text
Transformers
Safetensors
interns1
text-generation
conversational
custom_code
Eval Results
Instructions to use internlm/Intern-S1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use internlm/Intern-S1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="internlm/Intern-S1", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("internlm/Intern-S1", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use internlm/Intern-S1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "internlm/Intern-S1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "internlm/Intern-S1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/internlm/Intern-S1
- SGLang
How to use internlm/Intern-S1 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 "internlm/Intern-S1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "internlm/Intern-S1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "internlm/Intern-S1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "internlm/Intern-S1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use internlm/Intern-S1 with Docker Model Runner:
docker model run hf.co/internlm/Intern-S1
Commit History
-
fix out of vocab token
Verified signature59045e3
-
Update video_processing_interns1.py (#10)
Verified signature- Update video_processing_interns1.py (f85fa6d6771d6ac34f14e144648ab6c27fbca47a) Co-authored-by: Zhou Xinyu <jack-zxy@users.noreply.huggingface.co>8882cdb
-
Enlarging max_position_embeddings to support long-context generation for the specific inference engine. (#8)
Verified signature- Enlarging max_position_embeddings to support long-context generation for the specific inference engine. (d806df7d7c1007e08dbd7e161f3c3243e4f46b80)0ac9198
-
Update README.md
Verified signature32b3b66 -
Add library name (#7)
Verified signature- Add library name (73d224b97b5181116b20eb5de2fa51944d406d6d) Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>7be28ea
-
Update README.md
Verified signature293e42b -
Update README.md
Verified signaturea3ded57 -
Update README.md
Verified signaturefix technical report linkf59431a -
Update README.md
Verified signaturec1af7e6
-
Update README.md
Verified signatureedeb08e
-
lazy import CONFIG_MAPPING (#3)
Verified signature- lazy import CONFIG_MAPPING (a61bd1ed19d82c3e5c4581201bdc08c8425c16ec) - update (df592dd10cbfa995633accef35bdabf6af835d96) Co-authored-by: Zhou Xinyu <jack-zxy@users.noreply.huggingface.co>a277370 -
Update README.md
Verified signature8aa545a
-
Update README.md
Verified signatureba2dece
-
Update README.md
Verified signature488dce9 -
Update README.md
Verified signature365c1ce -
Update README.md
Verified signaturebb817c8 -
Update README.md
Verified signature3418427
-
Update README.md
Verified signature58a3e6b -
Update README.md
Verified signatureb29f2c8 -
Update README.md
Verified signature937170b -
Update README.md
Verified signature0d87486 -
Update README.md
Verified signature2a79595 -
Update README.md
Verified signatureff0c7fd
-
Upload LICENSE.txt
Verified signaturedad998b -
upload model
Verified signaturea5aafdb -
initial commit
Verified signature2a69dc2