Instructions to use shibatch/stories-converted with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shibatch/stories-converted with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("shibatch/stories-converted", dtype="auto") - llama-cpp-python
How to use shibatch/stories-converted with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="shibatch/stories-converted", filename="stories15M.BF16.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use shibatch/stories-converted with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf shibatch/stories-converted:BF16 # Run inference directly in the terminal: llama-cli -hf shibatch/stories-converted:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf shibatch/stories-converted:BF16 # Run inference directly in the terminal: llama-cli -hf shibatch/stories-converted:BF16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf shibatch/stories-converted:BF16 # Run inference directly in the terminal: ./llama-cli -hf shibatch/stories-converted:BF16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf shibatch/stories-converted:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf shibatch/stories-converted:BF16
Use Docker
docker model run hf.co/shibatch/stories-converted:BF16
- LM Studio
- Jan
- Ollama
How to use shibatch/stories-converted with Ollama:
ollama run hf.co/shibatch/stories-converted:BF16
- Unsloth Studio
How to use shibatch/stories-converted with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for shibatch/stories-converted to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for shibatch/stories-converted to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for shibatch/stories-converted to start chatting
- Docker Model Runner
How to use shibatch/stories-converted with Docker Model Runner:
docker model run hf.co/shibatch/stories-converted:BF16
- Lemonade
How to use shibatch/stories-converted with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull shibatch/stories-converted:BF16
Run and chat with the model
lemonade run user.stories-converted-BF16
List all available models
lemonade list
Upload folder using huggingface_hub
Browse files
hf_stories15M/chat_template.jinja
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = false %}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if loop.index0 == 0 and system_message != false %}{% set content = '<<SYS>>\n' + system_message + '\n<</SYS>>\n\n' + message['content'] %}{% else %}{% set content = message['content'] %}{% endif %}{% if message['role'] == 'user' %}{{ bos_token + '[INST] ' + content.strip() + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ ' ' + content.strip() + ' ' + eos_token }}{% endif %}{% endfor %}
|
hf_stories15M/config.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"attention_bias": false,
|
| 3 |
+
"attention_dropout": 0.0,
|
| 4 |
+
"bos_token_id": 1,
|
| 5 |
+
"eos_token_id": 2,
|
| 6 |
+
"head_dim": 48,
|
| 7 |
+
"hidden_act": "silu",
|
| 8 |
+
"hidden_size": 288,
|
| 9 |
+
"initializer_range": 0.02,
|
| 10 |
+
"intermediate_size": 768,
|
| 11 |
+
"max_position_embeddings": 256,
|
| 12 |
+
"mlp_bias": false,
|
| 13 |
+
"model_type": "llama",
|
| 14 |
+
"num_attention_heads": 6,
|
| 15 |
+
"num_hidden_layers": 6,
|
| 16 |
+
"num_key_value_heads": 6,
|
| 17 |
+
"pad_token_id": null,
|
| 18 |
+
"pretraining_tp": 1,
|
| 19 |
+
"rms_norm_eps": 1e-05,
|
| 20 |
+
"rope_parameters": {
|
| 21 |
+
"rope_theta": 10000.0,
|
| 22 |
+
"rope_type": "default"
|
| 23 |
+
},
|
| 24 |
+
"tie_word_embeddings": false,
|
| 25 |
+
"transformers_version": "5.9.0",
|
| 26 |
+
"use_cache": true,
|
| 27 |
+
"vocab_size": 32000
|
| 28 |
+
}
|
hf_stories15M/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aa5b2be2bdc1c7f09398bc1ab07933c0adae6f707ace5c2c92d7258db9b994ce
|
| 3 |
+
size 97636992
|
hf_stories15M/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
hf_stories15M/tokenizer_config.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": null,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"is_local": false,
|
| 8 |
+
"local_files_only": false,
|
| 9 |
+
"model_max_length": 2048,
|
| 10 |
+
"pad_token": null,
|
| 11 |
+
"sp_model_kwargs": {},
|
| 12 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 13 |
+
"unk_token": "<unk>",
|
| 14 |
+
"use_default_system_prompt": false
|
| 15 |
+
}
|