Text Generation
Transformers
Safetensors
English
qwen3_5_text
lora
sft
interactive-fiction
storytelling
qwen
conversational
Instructions to use SatorTenet/StoryEngine-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SatorTenet/StoryEngine-2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SatorTenet/StoryEngine-2B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SatorTenet/StoryEngine-2B") model = AutoModelForCausalLM.from_pretrained("SatorTenet/StoryEngine-2B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SatorTenet/StoryEngine-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SatorTenet/StoryEngine-2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SatorTenet/StoryEngine-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SatorTenet/StoryEngine-2B
- SGLang
How to use SatorTenet/StoryEngine-2B 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 "SatorTenet/StoryEngine-2B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SatorTenet/StoryEngine-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "SatorTenet/StoryEngine-2B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SatorTenet/StoryEngine-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SatorTenet/StoryEngine-2B with Docker Model Runner:
docker model run hf.co/SatorTenet/StoryEngine-2B
v2: Add onboarding & redirect training (greeting, off-topic, free-text choices)
Browse files- model.safetensors +1 -1
- tokenizer_config.json +1 -1
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3763691728
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fd7b451c148acf7a280b42f34f7779dbbd587d85ce8aeb580fb1ef1a7a5a1095
|
| 3 |
size 3763691728
|
tokenizer_config.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
| 20 |
"vision_bos_token": "<|vision_start|>",
|
| 21 |
"vision_eos_token": "<|vision_end|>"
|
| 22 |
},
|
| 23 |
-
"pad_token": "<|
|
| 24 |
"pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
|
| 25 |
"split_special_tokens": false,
|
| 26 |
"tokenizer_class": "TokenizersBackend",
|
|
|
|
| 20 |
"vision_bos_token": "<|vision_start|>",
|
| 21 |
"vision_eos_token": "<|vision_end|>"
|
| 22 |
},
|
| 23 |
+
"pad_token": "<|endoftext|>",
|
| 24 |
"pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
|
| 25 |
"split_special_tokens": false,
|
| 26 |
"tokenizer_class": "TokenizersBackend",
|