Text Generation
Transformers
Safetensors
English
ouro
custom-code
storytelling
small-language-model
recurrent-depth
synthetic-data
custom_code
Instructions to use raincandy-u/MacroStories with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use raincandy-u/MacroStories with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="raincandy-u/MacroStories", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("raincandy-u/MacroStories", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use raincandy-u/MacroStories with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "raincandy-u/MacroStories" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "raincandy-u/MacroStories", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/raincandy-u/MacroStories
- SGLang
How to use raincandy-u/MacroStories 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 "raincandy-u/MacroStories" \ --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": "raincandy-u/MacroStories", "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 "raincandy-u/MacroStories" \ --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": "raincandy-u/MacroStories", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use raincandy-u/MacroStories with Docker Model Runner:
docker model run hf.co/raincandy-u/MacroStories
Download tokenizer.json from raincandy-u/MacroStories: direct link, hf CLI and curl.
- Browser
- Download file 10.2 kB
-
https://huggingface.co/raincandy-u/MacroStories/resolve/main/tokenizer.json
- Command line
-
hf download hf://raincandy-u/MacroStories/tokenizer.json
-
curl -L -o tokenizer.json https://huggingface.co/raincandy-u/MacroStories/resolve/main/tokenizer.json
10.2 kB
| { | |
| "version": "1.0", | |
| "truncation": null, | |
| "padding": null, | |
| "added_tokens": [ | |
| { | |
| "id": 0, | |
| "content": "<|pad|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 1, | |
| "content": "<|start_story|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 2, | |
| "content": "<|end_story|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 3, | |
| "content": "<|unk|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 4, | |
| "content": "[PERSON_NAME_1]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 5, | |
| "content": "[PERSON_NAME_2]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 6, | |
| "content": "[PERSON_NAME_3]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| } | |
| ], | |
| "normalizer": null, | |
| "pre_tokenizer": { | |
| "type": "Sequence", | |
| "pretokenizers": [ | |
| { | |
| "type": "Split", | |
| "pattern": { | |
| "Regex": "\\s+(?=\\[PERSON_NAME_[0-9]+\\])" | |
| }, | |
| "behavior": "Isolated", | |
| "invert": false | |
| }, | |
| { | |
| "type": "Split", | |
| "pattern": { | |
| "Regex": "(?<=\\])(?=['’]s)" | |
| }, | |
| "behavior": "Isolated", | |
| "invert": false | |
| }, | |
| { | |
| "type": "ByteLevel", | |
| "add_prefix_space": false, | |
| "trim_offsets": true, | |
| "use_regex": true | |
| } | |
| ] | |
| }, | |
| "post_processor": null, | |
| "decoder": { | |
| "type": "ByteLevel", | |
| "add_prefix_space": true, | |
| "trim_offsets": true, | |
| "use_regex": true | |
| }, | |
| "model": { | |
| "type": "WordLevel", | |
| "vocab": { | |
| "<|pad|>": 0, | |
| "<|start_story|>": 1, | |
| "<|end_story|>": 2, | |
| "<|unk|>": 3, | |
| "[PERSON_NAME_1]": 4, | |
| "[PERSON_NAME_2]": 5, | |
| "[PERSON_NAME_3]": 6, | |
| "_": 7, | |
| ".": 8, | |
| "Ġthe": 9, | |
| "NAME": 10, | |
| "PERSON": 11, | |
| "[": 12, | |
| "Ġ": 13, | |
| "]": 14, | |
| "1": 15, | |
| "Ġand": 16, | |
| "Ġa": 17, | |
| "ĠThey": 18, | |
| "Ġto": 19, | |
| "ĠThe": 20, | |
| "Ġwas": 21, | |
| "2": 22, | |
| "Ġin": 23, | |
| "Ġball": 24, | |
| "Ġred": 25, | |
| "Ġof": 26, | |
| "Ġflower": 27, | |
| "Ġlooked": 28, | |
| "Ġat": 29, | |
| "Ġwater": 30, | |
| "Ġkite": 31, | |
| "Ġwalked": 32, | |
| ",": 33, | |
| "Ġbucket": 34, | |
| "Ġsmall": 35, | |
| "Ġstick": 36, | |
| "Ġbench": 37, | |
| "Ġinto": 38, | |
| "Ġit": 39, | |
| "Ġbread": 40, | |
| "Ġwanted": 41, | |
| "Ġsmiled": 42, | |
| "Ġdry": 43, | |
| "Ġgrabbed": 44, | |
| "Ġreached": 45, | |
| "Ġcup": 46, | |
| "Ġbook": 47, | |
| "Ġtoward": 48, | |
| "Ġon": 49, | |
| "Ġbirdhouse": 50, | |
| "Ġagain": 51, | |
| "Ġacross": 52, | |
| "Ġboard": 53, | |
| "].": 54, | |
| "Ġfor": 55, | |
| "Ġpaper": 56, | |
| "Ġpath": 57, | |
| "Ġcarefully": 58, | |
| "Ġbasket": 59, | |
| "Ġheld": 60, | |
| "Ġsaid": 61, | |
| "Ġmoved": 62, | |
| "Ġvillage": 63, | |
| "Ġunder": 64, | |
| "Ġover": 65, | |
| "Ġonto": 66, | |
| "Ġhad": 67, | |
| "Ġplaced": 68, | |
| "Ġsaw": 69, | |
| "Ġyard": 70, | |
| "Ġfrom": 71, | |
| "Ġstones": 72, | |
| "Ġgrass": 73, | |
| "Ġcloth": 74, | |
| "Ġhappy": 75, | |
| "Ġlarge": 76, | |
| "Ġgarden": 77, | |
| "Ġpatch": 78, | |
| "I": 79, | |
| "Ġmud": 80, | |
| "Ġgap": 81, | |
| "Ġwooden": 82, | |
| "Ġseveral": 83, | |
| "Ġrolled": 84, | |
| "Ġstone": 85, | |
| "Ġtear": 86, | |
| "Ġbright": 87, | |
| "Ġvery": 88, | |
| "Ġflew": 89, | |
| "Ġpoured": 90, | |
| "Ġglue": 91, | |
| "Ġheavy": 92, | |
| "ĠIt": 93, | |
| "Ġnails": 94, | |
| "Ġsoil": 95, | |
| "\"": 96, | |
| "Ġfirmly": 97, | |
| "Ġfresh": 98, | |
| "Ġhome": 99, | |
| "Ġstepped": 100, | |
| "Ġout": 101, | |
| "Ġdirt": 102, | |
| "Ġnear": 103, | |
| "Ġsteady": 104, | |
| "Ġtightly": 105, | |
| "!\"": 106, | |
| "Ġknelt": 107, | |
| "Ġwith": 108, | |
| "Ġhouse": 109, | |
| "Ġwere": 110, | |
| "Ġground": 111, | |
| "ĠFinally": 112, | |
| "Ġfelt": 113, | |
| "Ġwent": 114, | |
| "Ġback": 115, | |
| "Ġpushed": 116, | |
| "Ġtrips": 117, | |
| "Ġbecause": 118, | |
| "Ġpressed": 119, | |
| "Ġtoo": 120, | |
| "Ġaround": 121, | |
| "Ġgot": 122, | |
| "Ġgripped": 123, | |
| "Ġran": 124, | |
| "Ġup": 125, | |
| ",\"": 126, | |
| "The": 127, | |
| "Ġone": 128, | |
| "Ġsun": 129, | |
| "Ġarrived": 130, | |
| "Ġbut": 131, | |
| "Ġlong": 132, | |
| "Ġnoticed": 133, | |
| "Ġfinished": 134, | |
| "Ġthrough": 135, | |
| "Ġcarried": 136, | |
| "Ġtree": 137, | |
| "Ġpark": 138, | |
| "Ġenough": 139, | |
| "Ġdipped": 140, | |
| "Ġsafely": 141, | |
| "Ġwood": 142, | |
| "Ġ\"": 143, | |
| "Ġbakery": 144, | |
| "Ġfound": 145, | |
| "Ġsky": 146, | |
| "Ġhigh": 147, | |
| "Ġmade": 148, | |
| "Ġtogether": 149, | |
| "Ġsat": 150, | |
| "Ġhole": 151, | |
| "Ġmuddy": 152, | |
| "Ġdark": 153, | |
| "Ġdoor": 154, | |
| "Ġkept": 155, | |
| "Ġbag": 156, | |
| "Ġedge": 157, | |
| "Ġschool": 158, | |
| "Ġtheir": 159, | |
| "Ġflat": 160, | |
| "Ġpiece": 161, | |
| "Ġtapped": 162, | |
| "Ġwant": 163, | |
| "Ġwatched": 164, | |
| "Ġnot": 165, | |
| "Ġsome": 166, | |
| "Ġwind": 167, | |
| "Ġfull": 168, | |
| "Ġpetals": 169, | |
| "Ġbalanced": 170, | |
| "Ġbuild": 171, | |
| "Ġreceived": 172, | |
| "Ġthirsty": 173, | |
| "Ġworked": 174, | |
| "Ġfix": 175, | |
| "Ġdown": 176, | |
| "Ġfly": 177, | |
| "Ġsad": 178, | |
| "Ġcity": 179, | |
| "Ġhelp": 180, | |
| "Ġsturdy": 181, | |
| "Ġtook": 182, | |
| "Ġhammer": 183, | |
| "Ġreach": 184, | |
| "Ġthick": 185, | |
| "Ġthis": 186, | |
| "Ġbottom": 187, | |
| "Ġfirst": 188, | |
| "Ġspace": 189, | |
| "Ġuntil": 190, | |
| "Ġwaited": 191, | |
| "Ġwrapped": 192, | |
| "Ġalong": 193, | |
| "Ġmany": 194, | |
| "Ġside": 195, | |
| "Ġnearby": 196, | |
| "Ġreturn": 197, | |
| "Ġfar": 198, | |
| "Ġplant": 199, | |
| "Ġsighed": 200, | |
| "Ġwarm": 201, | |
| "Ġclean": 202, | |
| "Ġhanded": 203, | |
| "Ġmiddle": 204, | |
| "Ġaway": 205, | |
| "Ġfalling": 206, | |
| "Ġinside": 207, | |
| "Ġspotted": 208, | |
| "Ġtried": 209, | |
| "Ġstopped": 210, | |
| "Ġslowly": 211, | |
| "Ġstring": 212, | |
| "Ġwoods": 213, | |
| "Ġagainst": 214, | |
| "Ġcolorful": 215, | |
| "Ġother": 216, | |
| "Ġblue": 217, | |
| "Ġby": 218, | |
| "ĠA": 219, | |
| "Ġlift": 220, | |
| "Ġpieces": 221, | |
| "Ġwork": 222, | |
| "Ġfall": 223, | |
| "Ġpicked": 224, | |
| "ĠHowever": 225, | |
| "Ġforward": 226, | |
| "Ġhands": 227, | |
| "Ġbrought": 228, | |
| "Ġloaves": 229, | |
| "Ġthem": 230, | |
| "Ġthey": 231, | |
| "Ġanother": 232, | |
| "Ġcan": 233, | |
| "Ġcarry": 234, | |
| "Ġstayed": 235, | |
| "Ġreturned": 236, | |
| "Ġshouted": 237, | |
| "Ġstrong": 238, | |
| "Ġready": 239, | |
| "Ġtime": 240, | |
| "Ġbirds": 241, | |
| "Ġbring": 242, | |
| "Ġnarrow": 243, | |
| "Ġgood": 244, | |
| "Ġkeep": 245, | |
| "Ġneeded": 246, | |
| "Ġnext": 247, | |
| "Ġopened": 248, | |
| "Ġdid": 249, | |
| "Ġput": 250, | |
| "You": 251, | |
| "Ġforth": 252, | |
| "Ġmore": 253, | |
| "Ġstood": 254, | |
| "Ġboth": 255, | |
| "Ġfence": 256, | |
| "Ġwould": 257, | |
| "Ġcould": 258, | |
| "Ġperfectly": 259, | |
| "Ġsecure": 260, | |
| "ĠThen": 261, | |
| "Ġadded": 262, | |
| "Ġdeep": 263, | |
| "Ġloaf": 264, | |
| "Ġmy": 265, | |
| "Ġfriend": 266, | |
| "ĠSuddenly": 267, | |
| "Ġgrip": 268, | |
| "Ġstep": 269, | |
| "Ġplay": 270, | |
| "Ġrepeated": 271, | |
| "Ġyou": 272, | |
| "Ġcaught": 273, | |
| "Ġfixed": 274, | |
| "Ġtimes": 275, | |
| "Ġway": 276, | |
| "Ġbird": 277, | |
| "Ġthen": 278, | |
| "Ġtight": 279, | |
| "Ġtorn": 280, | |
| "'s": 281, | |
| "Ġget": 282, | |
| "Ġnail": 283, | |
| "Ġopen": 284, | |
| "ĠAfter": 285, | |
| "Ġcups": 286, | |
| "Ġfell": 287, | |
| "Ġhave": 288, | |
| "Ġhold": 289, | |
| "Ġlifted": 290, | |
| "Ġmake": 291, | |
| "A": 292, | |
| "We": 293, | |
| "Ġ\"[": 294, | |
| "Ġempty": 295, | |
| "Ġstuck": 296, | |
| "Ġwell": 297, | |
| "Ġfilled": 298, | |
| "Ġhelped": 299, | |
| "Ġstay": 300, | |
| "Ġdone": 301, | |
| "Ġfabric": 302, | |
| "Ġlittle": 303, | |
| "Ġnew": 304, | |
| "Ġplace": 305, | |
| "Ġproud": 306, | |
| "Ġquickly": 307, | |
| "Ġbalance": 308, | |
| "Ġcheered": 309, | |
| "Ġspread": 310, | |
| "Ġsteps": 311, | |
| "Ġgave": 312, | |
| "Ġthat": 313, | |
| "Ġthere": 314, | |
| "],": 315, | |
| "Ġafter": 316, | |
| "Ġbetween": 317, | |
| "Ġbrown": 318, | |
| "Ġedges": 319, | |
| "Ġnow": 320, | |
| "Ġsee": 321, | |
| "Ġwhile": 322, | |
| "Ġas": 323, | |
| "Ġdo": 324, | |
| "Ġdrop": 325, | |
| "Ġis": 326, | |
| "Ġlonger": 327, | |
| "Ġmove": 328, | |
| "Ġno": 329, | |
| "Ġstill": 330, | |
| "It": 331, | |
| "ĠI": 332, | |
| "Ġfind": 333, | |
| "Ġits": 334, | |
| "Ġme": 335, | |
| "Ġneed": 336, | |
| "Ġroll": 337, | |
| "Ġwhen": 338, | |
| "!": 339, | |
| ".\"": 340, | |
| "?\"": 341, | |
| "Yes": 342, | |
| "Ġfinally": 343, | |
| "Ġgive": 344, | |
| "Ġyour": 345, | |
| "Look": 346, | |
| "Ġdinner": 347, | |
| "Ġevery": 348, | |
| "Ġgo": 349, | |
| "Ġlying": 350, | |
| "Ġstand": 351, | |
| "Ġwalk": 352, | |
| "Can": 353, | |
| "Is": 354, | |
| "Where": 355, | |
| "ĠBut": 356, | |
| "ĠIts": 357, | |
| "ĠMany": 358, | |
| "ĠNow": 359, | |
| "ĠOne": 360, | |
| "ĠSlowly": 361, | |
| "ĠThere": 362, | |
| "ĠThis": 363, | |
| "Ġam": 364, | |
| "Ġare": 365, | |
| "Ġbe": 366, | |
| "Ġbefore": 367, | |
| "Ġbegan": 368, | |
| "Ġlook": 369, | |
| "Ġmuch": 370, | |
| "Ġpush": 371, | |
| "Ġsmile": 372, | |
| "Ġso": 373, | |
| "Ġtap": 374, | |
| "Ġthemselves": 375, | |
| "Ġwatered": 376, | |
| "Ġworks": 377 | |
| }, | |
| "unk_token": "<|unk|>" | |
| } | |
| } |