Text Generation
Transformers
Safetensors
multiscreen
Generated from Trainer
sft
trl
tiny-stories
small-language-model
experimental
research
custom_code
Instructions to use kurogane/multiscreen_154M_tinystorys_vocab768 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kurogane/multiscreen_154M_tinystorys_vocab768 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kurogane/multiscreen_154M_tinystorys_vocab768", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("kurogane/multiscreen_154M_tinystorys_vocab768", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use kurogane/multiscreen_154M_tinystorys_vocab768 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kurogane/multiscreen_154M_tinystorys_vocab768" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kurogane/multiscreen_154M_tinystorys_vocab768", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/kurogane/multiscreen_154M_tinystorys_vocab768
- SGLang
How to use kurogane/multiscreen_154M_tinystorys_vocab768 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 "kurogane/multiscreen_154M_tinystorys_vocab768" \ --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": "kurogane/multiscreen_154M_tinystorys_vocab768", "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 "kurogane/multiscreen_154M_tinystorys_vocab768" \ --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": "kurogane/multiscreen_154M_tinystorys_vocab768", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use kurogane/multiscreen_154M_tinystorys_vocab768 with Docker Model Runner:
docker model run hf.co/kurogane/multiscreen_154M_tinystorys_vocab768
| """Transformers-compatible Multiscreen implementation. | |
| This package ports the core architecture from ``dieOD/multiscreen-pytorch`` to | |
| Hugging Face Transformers-style ``PreTrainedConfig`` / ``PreTrainedModel`` | |
| classes. | |
| """ | |
| from .configuration_multiscreen import MultiscreenConfig | |
| from .compile_utils import find_msvc_cl, load_vcvars_env, setup_compile_env | |
| from .data import PackedTextDataset | |
| from .modeling_multiscreen import ( | |
| GatedScreeningBlock, | |
| MultiscreenForCausalLM, | |
| MultiscreenLayer, | |
| MultiscreenModel, | |
| MultiscreenPreTrainedModel, | |
| ScreeningCache, | |
| convert_original_state_dict_for_causal_lm, | |
| convert_original_state_dict_for_model, | |
| ) | |
| __version__ = "0.1.2" | |
| __all__ = [ | |
| "MultiscreenConfig", | |
| "MultiscreenPreTrainedModel", | |
| "MultiscreenModel", | |
| "MultiscreenForCausalLM", | |
| "MultiscreenLayer", | |
| "GatedScreeningBlock", | |
| "ScreeningCache", | |
| "convert_original_state_dict_for_causal_lm", | |
| "convert_original_state_dict_for_model", | |
| "PackedTextDataset", | |
| "find_msvc_cl", | |
| "load_vcvars_env", | |
| "setup_compile_env", | |
| "register_multiscreen_auto_classes", | |
| ] | |
| def register_multiscreen_auto_classes() -> None: | |
| """Register Multiscreen with Transformers auto classes in this process. | |
| Use this when loading local checkpoints without ``trust_remote_code`` and | |
| without installing the model into a Transformers source tree:: | |
| from multiscreen_transformers import register_multiscreen_auto_classes | |
| register_multiscreen_auto_classes() | |
| from transformers import AutoModelForCausalLM | |
| model = AutoModelForCausalLM.from_pretrained("./checkpoint") | |
| """ | |
| from transformers import AutoConfig, AutoModel, AutoModelForCausalLM | |
| AutoConfig.register(MultiscreenConfig.model_type, MultiscreenConfig) | |
| AutoModel.register(MultiscreenConfig, MultiscreenModel) | |
| AutoModelForCausalLM.register(MultiscreenConfig, MultiscreenForCausalLM) | |