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
File size: 10,223 Bytes
a142550 | 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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 | {
"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|>"
}
} |