Instructions to use fla-hub/gla-1.3B-100B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use fla-hub/gla-1.3B-100B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="fla-hub/gla-1.3B-100B")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("fla-hub/gla-1.3B-100B", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use fla-hub/gla-1.3B-100B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "fla-hub/gla-1.3B-100B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fla-hub/gla-1.3B-100B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/fla-hub/gla-1.3B-100B
- SGLang
How to use fla-hub/gla-1.3B-100B 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 "fla-hub/gla-1.3B-100B" \ --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": "fla-hub/gla-1.3B-100B", "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 "fla-hub/gla-1.3B-100B" \ --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": "fla-hub/gla-1.3B-100B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use fla-hub/gla-1.3B-100B with Docker Model Runner:
docker model run hf.co/fla-hub/gla-1.3B-100B
Improve model card: Add description, links, usage, and update metadata
#1
by nielsr HF Staff - opened
This PR significantly improves the model card for fla-hub/gla-1.3B-100B by:
- Adding a detailed description of the model and its context, derived from the paper's abstract.
- Including a direct link to the research paper: A Systematic Analysis of Hybrid Linear Attention.
- Providing a link to the likely official code repository: https://github.com/FLAG-CMU/fla.
- Adding a practical Python code snippet for text generation using the Hugging Face
transformerslibrary, which significantly enhances usability. - Updating the metadata:
- Changed
library_namefromflatotransformersto enable the inference widget and better integrate with the Hugging Face ecosystem. - Added
pipeline_tag: text-generationas a top-level field for improved discoverability and categorization on the Hub.
- Changed
These additions will make the model more accessible and useful for the community.
yzhangcs changed pull request status to merged