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="JinyiHan/JET-7B")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("JinyiHan/JET-7B")
model = AutoModelForCausalLM.from_pretrained("JinyiHan/JET-7B")
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

JET-7B

JET-7B is designed to improve the efficient reasoning of LLMs by training the base DeepSeek-Distill-Qwen-7B model with a reinforcement learning framework. Through this training, the model learns to generate high-quality reasoning steps while minimizing unnecessary computation and token usage.

Chat Template

def build_JET_chat_template(question, tokenizer):
    system_prompt = (
        "You are a helpful AI assistant. A conversation takes place between the User "
        "and the Assistant. The User asks a question, and the Assistant solves it.\n"
        "Please help me solve this question. Wrap only the final answer in \\boxed{}."
    )
    return tokenizer.apply_chat_template(
        [
            {"role": "system", "content": system_prompt},
            {"role": "user", "content": question}
        ],
        tokenize=False,
        add_generation_prompt=True
    )
Downloads last month
6
Safetensors
Model size
8B params
Tensor type
BF16
·
Inference Providers NEW
Input a message to start chatting with JinyiHan/JET-7B.

Model tree for JinyiHan/JET-7B

Quantizations
2 models