Text Generation
Transformers
Safetensors
English
Russian
kda
linear-attention
hybrid-attention
flash-linear-attention
grouped-query-attention
roleplay
fanfiction
my-little-pony
creative-writing
chat
uncensored
conversational
Instructions to use CastIronMind/Lissa-1.5B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CastIronMind/Lissa-1.5B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CastIronMind/Lissa-1.5B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("CastIronMind/Lissa-1.5B-Instruct", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CastIronMind/Lissa-1.5B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CastIronMind/Lissa-1.5B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CastIronMind/Lissa-1.5B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/CastIronMind/Lissa-1.5B-Instruct
- SGLang
How to use CastIronMind/Lissa-1.5B-Instruct 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 "CastIronMind/Lissa-1.5B-Instruct" \ --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": "CastIronMind/Lissa-1.5B-Instruct", "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 "CastIronMind/Lissa-1.5B-Instruct" \ --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": "CastIronMind/Lissa-1.5B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use CastIronMind/Lissa-1.5B-Instruct with Docker Model Runner:
docker model run hf.co/CastIronMind/Lissa-1.5B-Instruct
Download tokenizer_config.json from CastIronMind/Lissa-1.5B-Instruct: direct link, hf CLI and curl.
- Browser
- Download file 2.72 kB
-
https://huggingface.co/CastIronMind/Lissa-1.5B-Instruct/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://CastIronMind/Lissa-1.5B-Instruct/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/CastIronMind/Lissa-1.5B-Instruct/resolve/main/tokenizer_config.json
2.72 kB
| { | |
| "add_bos_token": false, | |
| "add_eos_token": false, | |
| "bos_token": "<bos>", | |
| "eos_token": "<eos>", | |
| "pad_token": "<eos>", | |
| "unk_token": null, | |
| "clean_up_tokenization_spaces": false, | |
| "model_max_length": 16384, | |
| "tokenizer_class": "PreTrainedTokenizerFast", | |
| "chat_template": "{#-\n Lissa 1.5B - chat template (ChatML variant with a reasoning block).\n\n Canonical sequence, as used for the SFT run:\n\n <bos><im_start><system>{system}<im_end>\n <im_start><user>{user}<im_end>\n <im_start><assistant>[<|think|>{think}<|/think|>]{answer}<im_end><eos>\n\n Notes:\n\n * <bos> is emitted by this template. The shipped tokenizer.json has a ByteLevel\n post-processor, not a TemplateProcessing one, so no BOS is added automatically\n and add_special_tokens has no effect on it.\n\n * <eos> is emitted only when the conversation ends on an assistant turn, i.e. when\n the rendered text is a complete training sequence. With add_generation_prompt=True\n it is not emitted, so the model generates the assistant turn itself.\n\n * The <|think|> block is optional and is read from the `reasoning_content` field of\n an assistant message (the `think` field is accepted as an alias). The model is\n reasoning-first: it opens the block on its own, so it does not need to be\n prefilled at generation time.\n\n * <en>, <ru>, </en>, </ru> and <endofprompt> are never emitted. They exist in the\n vocabulary but were removed from the supervised data.\n\n * A non-empty system message is required. The model was supervised with one on every\n example; \"You are a helpful assistant.\" specifically should not be used, it pulls\n the model towards a generic assistant identity.\n-#}\n{{- '<bos>' -}}\n{%- for message in messages -%}\n {%- set content = message['content'] if message['content'] is not none else '' -%}\n {%- if message['role'] == 'system' -%}\n {{- '<im_start><system>' + content + '<im_end>' -}}\n {%- elif message['role'] == 'user' -%}\n {{- '<im_start><user>' + content + '<im_end>' -}}\n {%- elif message['role'] == 'assistant' -%}\n {%- set think = message.get('reasoning_content') or message.get('think') -%}\n {{- '<im_start><assistant>' -}}\n {%- if think -%}\n {{- '<|think|>' + think + '<|/think|>' -}}\n {%- endif -%}\n {{- content + '<im_end>' -}}\n {%- else -%}\n {{- raise_exception('Lissa chat template: unexpected role \"' + message['role'] + '\"') -}}\n {%- endif -%}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{- '<im_start><assistant>' -}}\n{%- elif messages and messages[-1]['role'] == 'assistant' -%}\n {{- '<eos>' -}}\n{%- endif -%}\n" | |
| } | |