Instructions to use IndexTeam/Index-1.9B-Constant-LR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IndexTeam/Index-1.9B-Constant-LR with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IndexTeam/Index-1.9B-Constant-LR", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("IndexTeam/Index-1.9B-Constant-LR", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IndexTeam/Index-1.9B-Constant-LR with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IndexTeam/Index-1.9B-Constant-LR" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IndexTeam/Index-1.9B-Constant-LR", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/IndexTeam/Index-1.9B-Constant-LR
- SGLang
How to use IndexTeam/Index-1.9B-Constant-LR 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 "IndexTeam/Index-1.9B-Constant-LR" \ --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": "IndexTeam/Index-1.9B-Constant-LR", "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 "IndexTeam/Index-1.9B-Constant-LR" \ --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": "IndexTeam/Index-1.9B-Constant-LR", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use IndexTeam/Index-1.9B-Constant-LR with Docker Model Runner:
docker model run hf.co/IndexTeam/Index-1.9B-Constant-LR
Add pipeline tag, library name, and paper link to model card
#2
by nielsr HF Staff - opened
Hi! I'm Niels from the Hugging Face community team.
I've opened this PR to enhance your model card with metadata and usage information:
- Added
pipeline_tag: text-generationandlibrary_name: transformersto the YAML metadata. This enables the "Use in Transformers" button on the hub. - Linked the model card to its respective paper: Index SLM Technical Report.
- Added a "How to Use" code snippet demonstrating how to load the model using
transformers. - Appended model license and citation sections.
Please review and merge if this looks good to you!