Text Generation
Transformers
PyTorch
English
taonet_mini_t2
taonet
taotern
ssm
state-space-model
dplr
custom_code
experimental
Instructions to use TaoTern/TaoNet-mini-T2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TaoTern/TaoNet-mini-T2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TaoTern/TaoNet-mini-T2", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("TaoTern/TaoNet-mini-T2", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use TaoTern/TaoNet-mini-T2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TaoTern/TaoNet-mini-T2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TaoTern/TaoNet-mini-T2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TaoTern/TaoNet-mini-T2
- SGLang
How to use TaoTern/TaoNet-mini-T2 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 "TaoTern/TaoNet-mini-T2" \ --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": "TaoTern/TaoNet-mini-T2", "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 "TaoTern/TaoNet-mini-T2" \ --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": "TaoTern/TaoNet-mini-T2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TaoTern/TaoNet-mini-T2 with Docker Model Runner:
docker model run hf.co/TaoTern/TaoNet-mini-T2
| [build-system] | |
| requires = ["setuptools>=61.0", "wheel"] | |
| build-backend = "setuptools.build_meta" | |
| [project] | |
| name = "gamma-ssm-s4-enhanced" | |
| version = "0.1.0" | |
| description = "Gamma-structured SSM blocks with S4-inspired stability and full-sequence paths" | |
| readme = "README.md" | |
| requires-python = ">=3.8" | |
| license = {text = "MIT"} | |
| authors = [ | |
| {name = "StarMists"} | |
| ] | |
| keywords = ["ssm", "state-space-models", "s4", "hippo", "mamba", "sequence-modeling", "gamma-ssm"] | |
| classifiers = [ | |
| "Development Status :: 3 - Alpha", | |
| "Intended Audience :: Developers", | |
| "Intended Audience :: Science/Research", | |
| "License :: OSI Approved :: MIT License", | |
| "Operating System :: OS Independent", | |
| "Programming Language :: Python :: 3", | |
| "Programming Language :: Python :: 3.8", | |
| "Programming Language :: Python :: 3.9", | |
| "Programming Language :: Python :: 3.10", | |
| "Programming Language :: Python :: 3.11", | |
| "Topic :: Scientific/Engineering :: Artificial Intelligence", | |
| ] | |
| dependencies = [ | |
| "torch>=1.12.0", | |
| "numpy>=1.20.0", | |
| ] | |
| # Optional performance optimizations | |
| [project.optional-dependencies] | |
| dev = [ | |
| "pytest>=7.0", | |
| "pytest-cov", | |
| "build", | |
| "wheel", | |
| "black", | |
| "isort", | |
| "flake8", | |
| "mypy", | |
| ] | |
| notebook = [ | |
| "matplotlib>=3.6", | |
| "pandas>=1.5", | |
| "seaborn>=0.12", | |
| "jupyter>=1.0", | |
| "torchvision>=0.13", | |
| ] | |
| performance = [ | |
| "triton>=2.0.0;platform_system!='Windows'", | |
| ] | |
| [project.urls] | |
| Homepage = "https://github.com/StarMists/gamma_SSM_S4_enhanced" | |
| Documentation = "https://github.com/StarMists/gamma_SSM_S4_enhanced#readme" | |
| Repository = "https://github.com/StarMists/gamma_SSM_S4_enhanced.git" | |
| Issues = "https://github.com/StarMists/gamma_SSM_S4_enhanced/issues" | |
| [tool.setuptools] | |
| include-package-data = true | |
| [tool.setuptools.packages.find] | |
| include = ["gamma_space_model*", "csrc*"] | |
| exclude = [ | |
| "benchmarks*", | |
| "examples*", | |
| "output*", | |
| "scripts*", | |
| "tests*", | |
| ] | |
| [tool.pytest.ini_options] | |
| testpaths = ["tests"] | |
| [tool.black] | |
| line-length = 100 | |
| target-version = ['py38', 'py39', 'py310', 'py311'] | |
| [tool.isort] | |
| profile = "black" | |
| line_length = 100 | |
| [tool.mypy] | |
| python_version = "3.8" | |
| warn_return_any = true | |
| warn_unused_configs = true | |
| disallow_untyped_defs = false | |