PSANDILYA1440 commited on
Commit
ad3cc60
·
verified ·
1 Parent(s): 152b914

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +47 -0
README.md ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: transformers
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - from-scratch
7
+ - micropython
8
+ ---
9
+
10
+ # MicroBot Scratch
11
+
12
+ MicroBot is a 2,157,696-parameter decoder-only Transformer initialized with random weights and trained from scratch on 27 self-authored conversation examples. It does not use a pretrained base model or hosted inference service.
13
+
14
+ ## Intended use
15
+
16
+ This checkpoint is an educational experiment for exploring the mechanics of training a language model from random initialization. It is not a capable general-purpose assistant or a reliable MicroPython coding model. The small dataset mostly covers simple MicroPython examples and a few general explanations. It has no live web access by itself; web search is implemented in the separate MicroBot application.
17
+
18
+ ## Limitations
19
+
20
+ This is a very small experimental model. Its limited parameter count and tiny training corpus produce weak, often incoherent generations. It may produce incorrect or unsafe code. Do not rely on it for factual, educational, or hardware guidance without checking its output. It has not been evaluated on held-out data or benchmarks. Publication makes the checkpoint downloadable; it does not imply that it meets production or assistant quality expectations.
21
+
22
+ ## Training
23
+
24
+ - Training data: 27 self-authored conversations in the MicroBot starter corpus.
25
+ - Architecture: GPT-2-style causal language model; 4 layers, width 192, vocabulary size 1,584.
26
+ - Training: 60 epochs on a Mac CPU, starting from random initialization.
27
+ - Pretrained base model: none.
28
+
29
+ ## Load with Transformers
30
+
31
+ ```python
32
+ from transformers import AutoModelForCausalLM, AutoTokenizer
33
+
34
+ model_id = "psandilya1440/microbot-scratch" # replace if you publish under another repository name
35
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
36
+ model = AutoModelForCausalLM.from_pretrained(model_id)
37
+
38
+ prompt = (
39
+ "<|bos|><|system|>\nYou are MicroBot. Coding help is MicroPython only.\n"
40
+ "<|user|>\nExplain what a GPIO pin does.\n<|assistant|>\n"
41
+ )
42
+ inputs = tokenizer(prompt, return_tensors="pt")
43
+ outputs = model.generate(**inputs, max_new_tokens=80, do_sample=False)
44
+ print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
45
+ ```
46
+
47
+ Generation quality is poor and may be incoherent; this example demonstrates loading only, not a recommended production workflow.