How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="jan-hq/stealth-v1.1")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("jan-hq/stealth-v1.1")
model = AutoModelForCausalLM.from_pretrained("jan-hq/stealth-v1.1")
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]:]))
Quick Links
Jan banner

Jan - Discord

Prompt template

ChatML

<|im_start|>system
{system_message}<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant

Run this model

You can run this model using Jan Desktop on Mac, Windows, or Linux.

Jan is an open source, ChatGPT alternative that is:

  • ๐Ÿ’ป 100% offline on your machine: Your conversations remain confidential, and visible only to you.
  • ๐Ÿ—‚๏ธ An Open File Format: Conversations and model settings stay on your computer and can be exported or deleted at any time.
  • ๐ŸŒ OpenAI Compatible: Local server on port 1337 with OpenAI compatible endpoints
  • ๐ŸŒ Open Source & Free: We build in public; check out our Github

image/png

About Jan

Jan believes in the need for an open-source AI ecosystem and is building the infra and tooling to allow open-source AIs to compete on a level playing field with proprietary ones.

Jan's long-term vision is to build a cognitive framework for future robots, who are practical, useful assistants for humans and businesses in everyday life.

Downloads last month
5
Safetensors
Model size
7B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Collection including jan-hq/stealth-v1.1