Instructions to use LANSG/GEM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LANSG/GEM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="LANSG/GEM")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("LANSG/GEM", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LANSG/GEM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LANSG/GEM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LANSG/GEM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LANSG/GEM
- SGLang
How to use LANSG/GEM 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 "LANSG/GEM" \ --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": "LANSG/GEM", "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 "LANSG/GEM" \ --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": "LANSG/GEM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LANSG/GEM with Docker Model Runner:
docker model run hf.co/LANSG/GEM
Commit History
-
Add pipeline tag and library name, link to code
Verified signatureThis PR adds the `pipeline_tag` and `library_name` to the model card metadata. The `pipeline_tag` is set to `image-text-to-text` based on the model's functionality. The `library_name` is set to `transformers` given the model architecture. The Github link was added to allow for greater reproductivity.14bbf0b -
Update README.md
Verified signature26db68e
-
Upload trainer_state.json with huggingface_hub
Verified signaturef4a0b24 -
Upload tokenizer.model with huggingface_hub
Verified signature202a840 -
Upload tokenizer_config.json with huggingface_hub
Verified signaturecbaea23 -
Upload special_tokens_map.json with huggingface_hub
Verified signaturefdf9f6d -
Upload model.safetensors.index.json with huggingface_hub
Verified signature1538fb4 -
Upload model-00003-of-00003.safetensors with huggingface_hub
Verified signature20e1bfa -
Upload model-00002-of-00003.safetensors with huggingface_hub
Verified signatured303c08 -
Upload model-00001-of-00003.safetensors with huggingface_hub
Verified signature914b508 -
Upload generation_config.json with huggingface_hub
Verified signatured97dc53 -
Upload config.json with huggingface_hub
Verified signature2036860 -
initial commit
Verified signaturec77dd23