Instructions to use alkasima/Hakkillo-135M-v0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use alkasima/Hakkillo-135M-v0.1 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM2-135M-Instruct") model = PeftModel.from_pretrained(base_model, "alkasima/Hakkillo-135M-v0.1") - Notebooks
- Google Colab
- Kaggle
Hakkillo 135M v0.1
An experimental English assistant adaptation of HuggingFaceTB/SmolLM2-135M-Instruct. This repository contains LoRA adapter weights, not a standalone model or a model pretrained from scratch. The original base weights and tokenizer are required and are downloaded automatically by the example below.
- Code and data: https://github.com/alkasima/Hakkillo
- Demo: https://huggingface.co/spaces/alkasima/Hakkillo
- Base revision:
12fd25f77366fa6b3b4b768ec3050bf629380bac - Base parameters: 134,515,008
- Trainable adapter parameters: 460,800
- Training: 48 CPU steps; batch size 1; float32; LoRA rank 8; learning rate 0.0001
- Data: 32 project-authored synthetic training examples; 8 separate development examples
- Seed: 42
Evaluation and limitations
Held-out assistant-token loss: 2.8116 before, 2.5544 after.
This tiny synthetic development set does not establish general improvement. No broad benchmark or safety validation is claimed.
The model can hallucinate, repeat itself, misunderstand instructions, and produce incorrect answers. It has no live information or tools.
Observed v0.1 failures include inventing current Lagos weather, an incorrect evaporation analogy, and mistaking a rewriting request for a request to access a file. The small development loss improvement does not resolve these failures.
Use it for experimentation and simple English tasks. It is not validated for high-stakes decisions or multilingual use.
See training_metrics.json for the run record and data hashes, and the code repository for qualitative comparisons.
Run
Install the pinned requirements.txt from the code repository (Python 3.10 or 3.11), then:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
torch.set_num_threads(4)
base = "HuggingFaceTB/SmolLM2-135M-Instruct"
revision = "12fd25f77366fa6b3b4b768ec3050bf629380bac"
tokenizer = AutoTokenizer.from_pretrained(base, revision=revision)
model = AutoModelForCausalLM.from_pretrained(base, revision=revision, dtype=torch.float32, use_safetensors=True)
model = PeftModel.from_pretrained(model, "alkasima/Hakkillo-135M-v0.1").eval()
messages = [
{"role": "system", "content": "You are Hakkillo, a small English AI assistant. Give clear, brief and helpful answers. If you do not know, say so. You cannot browse the web or take actions."},
{"role": "user", "content": "What is a language model?"},
]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt", return_dict=False)
with torch.inference_mode():
outputs = model.generate(inputs, attention_mask=torch.ones_like(inputs), max_new_tokens=96, do_sample=False, pad_token_id=tokenizer.eos_token_id)
print(tokenizer.decode(outputs[0, inputs.shape[1]:], skip_special_tokens=True))
Attribution and license
Apache-2.0. The base model was developed by Hugging Face's SmolLM team. Hakkillo adds a small project-specific adaptation.
Changes: LoRA adaptation of attention query/value projections using the included synthetic starter dataset.
Retain the original base model attribution and license when redistributing. See LICENSE and NOTICE.
- Downloads last month
- -