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
File size: 2,349 Bytes
e7b4e90 25d2f2f e7b4e90 25d2f2f e7b4e90 25d2f2f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | ---
library_name: transformers
model_name: multiscreen_psi16_768
license: apache-2.0
datasets:
- roneneldan/TinyStories
tags:
- generated_from_trainer
- sft
- trl
- multiscreen
- tiny-stories
- small-language-model
- experimental
- research
- arxiv:2604.01178
- arxiv:2305.07759
---
# Model Card for multiscreen_psi16_768
This model is an **unofficial** experimental pre-traind model of multiscreen with [ TinyStories](https://huggingface.co/datasets/roneneldan/TinyStories) datasets.
It has been trained using [TRL](https://github.com/huggingface/trl).
## Quick start
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "kurogane/tinystorys_multiscreen_vocab768"
cache_dir = r"/media/kurogane/backup/cache"
model = AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
cache_dir=cache_dir,
)
model.to("cuda:0")
tokenizer = AutoTokenizer.from_pretrained(
model_id,
padding_side="left",
cache_dir=cache_dir,
)
model_inputs = tokenizer(["A list of colors: red, blue"], return_tensors="pt").to(model.device)
generated_ids = model.generate(**model_inputs)
s_output = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(s_output)
```
### result example
> A list of colors: red, blue, yellow, green, orange. All the people
## Training procedure
This model was trained with SFT.
### Framework versions
- TRL: 0.24.0
- Transformers: 5.8.0
- Pytorch: 2.11.0+cu129
- Datasets: 4.3.0
- Tokenizers: 0.22.2
## Used archtechture
This model is an experimental tiny language model trained on TinyStories using a Multiscreen-style architecture inspired by the paper *Screening Is Enough* by Ken M. Nakanishi.
This model implementation was developed as an experimental Hugging Face Transformers port, with reference to the unofficial PyTorch implementation `dieOD/multiscreen-pytorch`. This model is not an official implementation released by the author of the Multiscreen paper.
- Multiscreen paper: https://arxiv.org/abs/2604.01178
- Reference implementation: https://github.com/dieOD/multiscreen-pytorch
## Used dataset
The training data is based on the TinyStories dataset by Ronen Eldan and Yuanzhi Li.
- TinyStories paper: https://arxiv.org/abs/2305.07759
- TinyStories dataset: https://huggingface.co/datasets/roneneldan/TinyStories
|