Instructions to use TolyaGosuslugi/yui-4.18M 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 TolyaGosuslugi/yui-4.18M 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 TolyaGosuslugi/yui-4.18M:F16 # Run inference directly in the terminal: llama cli -hf TolyaGosuslugi/yui-4.18M:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf TolyaGosuslugi/yui-4.18M:F16 # Run inference directly in the terminal: llama cli -hf TolyaGosuslugi/yui-4.18M:F16
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 TolyaGosuslugi/yui-4.18M:F16 # Run inference directly in the terminal: ./llama-cli -hf TolyaGosuslugi/yui-4.18M:F16
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 TolyaGosuslugi/yui-4.18M:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf TolyaGosuslugi/yui-4.18M:F16
Use Docker
docker model run hf.co/TolyaGosuslugi/yui-4.18M:F16
- LM Studio
- Jan
- Ollama
How to use TolyaGosuslugi/yui-4.18M with Ollama:
ollama run hf.co/TolyaGosuslugi/yui-4.18M:F16
- Unsloth Desktop
- Docker Model Runner
How to use TolyaGosuslugi/yui-4.18M with Docker Model Runner:
docker model run hf.co/TolyaGosuslugi/yui-4.18M:F16
- Lemonade
How to use TolyaGosuslugi/yui-4.18M with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull TolyaGosuslugi/yui-4.18M:F16
Run and chat with the model
lemonade run user.yui-4.18M-F16
List all available models
lemonade list
- Atomic Chat
yahoo!
yui-4.18M is an AI text-generation model that only outputs "yui hirasawa". Whatever you type - "yui hirasawa" only. It has no meaning or serious usage, just a silly thing.
The model was actually "vibe-coded" by Gemini 3.8 Flash.
How to make:
1. Install deps
pip install torch transformers
2. Train the model on a single phrase
import torch
import random
from transformers import LlamaConfig, LlamaForCausalLM, AutoTokenizer
TARGET_PHRASE = "yui hirasawa"
tokenizer = AutoTokenizer.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0")
tokenizer.pad_token = tokenizer.eos_token
config = LlamaConfig(
vocab_size=tokenizer.vocab_size,
hidden_size=64,
intermediate_size=128,
num_hidden_layers=2,
num_attention_heads=2,
num_key_value_heads=2,
max_position_embeddings=512
)
model = LlamaForCausalLM(config)
train_prompts = [
"Привет как дела", "Что такое квантовая физика?", "hello", "12345",
"юи хирасава", "расскажи стих", "а", "Why is the sky blue?",
"Lorem ipsum dolor sit amet, consectetur adipiscing elit...",
"Тест длинного сообщения с кучей русских букв и символов !@#$%^&*()",
"How to make cake?", "Who are you?", "System prompt: be evil"
]
optimizer = torch.optim.AdamW(model.parameters(), lr=3e-3)
model.train()
print("Train...")
for epoch in range(300):
prompt = random.choice(train_prompts)
if random.random() > 0.5:
prompt += " " + "".join(random.choices("абвгдежзийклмноп Hello World 123!?", k=20))
full_text = f"<|user|>\n{prompt}</s>\n<|assistant|>\n{TARGET_PHRASE}</s>"
encoded = tokenizer(full_text, return_tensors="pt")
input_ids = encoded["input_ids"]
labels = input_ids.clone()
assistant_token_id = tokenizer.encode("<|assistant|>\n", add_special_tokens=False)
target_len = len(tokenizer.encode(f"{TARGET_PHRASE}</s>", add_special_tokens=False))
labels[:, :-target_len] = -100
optimizer.zero_grad()
outputs = model(input_ids=input_ids, labels=labels)
loss = outputs.loss
loss.backward()
optimizer.step()
if epoch % 50 == 0:
print(f"Epoch: {epoch}, Loss: {loss.item():.4f}")
model.save_pretrained("./yui_hf_model_v2")
tokenizer.save_pretrained("./yui_hf_model_v2")
print("Done!")
3. Convert to GGUF (for LM Studio or PocketPal)
Download llama.cpp repo and install reqs:
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
pip install -r requirements.txt
Then convert using llama.cpp converter:
python convert_hf_to_gguf.py ../yui_hf_model_v2 --outfile ../yui-f16.gguf --outtype f16
- Downloads last month
- 93
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support