Instructions to use Nasaawakening/Zoder1.0-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Nasaawakening/Zoder1.0-1B with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Nasaawakening/Zoder1.0-1B:Q4_K_M # Run inference directly in the terminal: llama cli -hf Nasaawakening/Zoder1.0-1B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Nasaawakening/Zoder1.0-1B:Q4_K_M # Run inference directly in the terminal: llama cli -hf Nasaawakening/Zoder1.0-1B:Q4_K_M
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 Nasaawakening/Zoder1.0-1B:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Nasaawakening/Zoder1.0-1B:Q4_K_M
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 Nasaawakening/Zoder1.0-1B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Nasaawakening/Zoder1.0-1B:Q4_K_M
Use Docker
docker model run hf.co/Nasaawakening/Zoder1.0-1B:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use Nasaawakening/Zoder1.0-1B with Ollama:
ollama run hf.co/Nasaawakening/Zoder1.0-1B:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use Nasaawakening/Zoder1.0-1B with Docker Model Runner:
docker model run hf.co/Nasaawakening/Zoder1.0-1B:Q4_K_M
- Lemonade
How to use Nasaawakening/Zoder1.0-1B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Nasaawakening/Zoder1.0-1B:Q4_K_M
Run and chat with the model
lemonade run user.Zoder1.0-1B-Q4_K_M
List all available models
lemonade list
- Atomic Chat
File size: 2,734 Bytes
0ad1140 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
import gradio as gr
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, TextIteratorStreamer
from threading import Thread
MODEL_PATH = "/kaggle/working/zoder-merged"
SYSTEM_PROMPT = """You are Zoder 1.0-1B, an AI assistant created by Komandan Nasa from Bakso Bangi Pak Romdani, Kediri, Indonesia.
Your personality:
- Friendly and helpful
- Knowledgeable about technology, especially Termux and AI
- Proud of your Indonesian heritage
- You sometimes use casual Indonesian expressions
Always respond helpfully and accurately. If asked about your creator, mention Komandan Nasa and Kediri."""
def load_model():
print("Loading Zoder 1.0-1B...")
tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
MODEL_PATH,
trust_remote_code=True,
torch_dtype=torch.float16,
device_map="auto"
)
return tokenizer, model
tokenizer, model = load_model()
def chat(message, history):
messages = [{"role": "system", "content": SYSTEM_PROMPT}]
for user_msg, assistant_msg in history:
messages.append({"role": "user", "content": user_msg})
messages.append({"role": "assistant", "content": assistant_msg})
messages.append({"role": "user", "content": message})
formatted = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
inputs = tokenizer(formatted, return_tensors="pt").to(model.device)
streamer = TextIteratorStreamer(
tokenizer,
skip_prompt=True,
skip_special_tokens=True
)
generation_kwargs = {
"input_ids": inputs["input_ids"],
"max_new_tokens": 512,
"temperature": 0.7,
"top_p": 0.95,
"do_sample": True,
"streamer": streamer
}
thread = Thread(target=model.generate, kwargs=generation_kwargs)
thread.start()
partial_message = ""
for token in streamer:
partial_message += token
yield partial_message
with gr.Blocks(theme=gr.themes.Soft()) as demo:
gr.Markdown("# 🤖 Zoder 1.0-1B")
gr.Markdown("### AI Assistant by Komandan Nasa - Bakso Bangi Pak Romdani, Kediri")
chatbot = gr.ChatInterface(
fn=chat,
title="Zoder Chat",
description="Ask me anything! Powered by MiniCPM5-1B SLERP merge.",
examples=[
"Siapa yang membuatmu?",
"Bagaimana cara install Python di Termux?",
"Jelaskan tentang SLERP merge",
"Ceritakan tentang Kediri"
]
)
gr.Markdown("---")
gr.Markdown("Built with ❤️ in Kediri, Indonesia 🇮🇩")
demo.launch(share=True, server_port=7860)
|