Downloads · 30 days
15
8% of all-time downloads
Dummy9898/bear-240m-cpt
bear-240m-cpt is a text generation model from Dummy9898. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Mesosfer Bear AI (241.8M) is a high-efficiency autoregressive decoder-only language model built on a Llama-style architecture. This repository contains the official model weights and runtime engine for CPT ().
Downloads · 30 days
15
8% of all-time downloads
All-time downloads
187
Public
Repo size
1.9 GB
Likes
0
Public
Click a slice to open those files.
.pt967 MB · 100%
From the Hugging Face model README
Mesosfer Bear AI (241.8M) is a high-efficiency autoregressive decoder-only language model built on a Llama-style architecture. This repository contains the official model weights and runtime engine for CPT ().
d_model): 1024<|open|>...<|close|>) and Rust tiktoken acceleration.2.5907)You can run text generation and chat streaming immediately with zero external frameworks:
git clone https://huggingface.co/{REPO_ID}
cd {REPO_NAME}
pip install torch tiktoken
python inference.py --prompt "Jelaskan konsep machine learning secara singkat:"
python cli.py --temperature 0.7 --top-p 0.9
from engine.transformer import BearTransformer, BearConfig
from engine.tokenizer import BearTokenizer
import torch
# Load Tokenizer & Model
tokenizer = BearTokenizer.load("bear_tokenizer.json")
config = BearConfig.from_dict(torch.load("config.json"))
model = BearTransformer(config)
checkpoint = torch.load("bear_model.pt", map_location="cuda" if torch.cuda.is_available() else "cpu")
model.load_state_dict(checkpoint["model_state"] if "model_state" in checkpoint else checkpoint)
model.eval()
# Chat format
conversation = [
{"role": "system", "content": "Anda adalah asisten AI Bear yang cerdas dan ramah."},
{"role": "user", "content": "Halo! Siapa kamu?"}
]
prompt = tokenizer.apply_chat_template(conversation, thinking=True)
input_ids = torch.tensor([tokenizer.encode(prompt)], dtype=torch.long)
output_ids = model.generate(input_ids, max_new_tokens=256, temperature=0.7, top_p=0.9)
response = tokenizer.decode(output_ids[0].tolist())
print(response)
Distributed under the Apache-2.0 License. Developed by Mesosfer Team.