File size: 6,318 Bytes
ecc2f10
 
d33f561
 
 
 
 
 
 
ecc2f10
d33f561
 
 
 
 
 
 
 
 
9c73fbe
d33f561
 
 
 
 
 
 
 
 
 
 
 
 
 
0c2f6b8
d33f561
 
0c2f6b8
d33f561
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
---
license: apache-2.0
library_name: transformers
tags:
  - text-generation
  - causal-lm
  - custom-architecture
  - core
pipeline_tag: text-generation
---

<p align="center">
  <img src="https://opencore.one/og-image.png" alt="CORe" width="320" />
</p>

# CORe Predetermined V1

**CORe Predetermined V1** is a tiny (30M-parameter) decoder-only language model from **CORe Technologies**, built for one job: **predetermined outcomes without brittle exact-match rules**.

Traditional FAQ / canned-response software matches user input against thousands of stored question strings, and breaks the moment someone types `who's patricia` instead of `who is patricia`. CORe Predetermined takes a different approach: you fine-tune it on your question/answer pairs *once*, and the model generalizes across phrasing, so any reasonable rewording of a covered question returns your predetermined answer.

- **Base model is already filled with a few preview Q&As** (AI-fundamentals concepts) so you can test the behavior immediately, ask about them in any phrasing you like.
- **Fine-tune it on your own Q&A set** to replace or extend the predetermined knowledge. A few dozen pairs is enough.
- Runs anywhere: 120MB, CPU-friendly, no GPU required for inference.

## Quick start

> **Note:** this is a custom architecture, so `trust_remote_code=True` is **required** — without it `from_pretrained` will raise an error about the unknown `core` model type.

```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained(
    "OpenCOReTechnologies/CORe-Predetermined-v1", trust_remote_code=True
)
model.eval()
tok = AutoTokenizer.from_pretrained("OpenCOReTechnologies/CORe-Predetermined-v1")

def ask(question, max_new_tokens=120, temperature=0.3):
    text = tok.apply_chat_template(
        [{"role": "user", "content": question}],
        add_generation_prompt=True, tokenize=False,
    )
    enc = tok(text, add_special_tokens=False, return_tensors="pt")
    out = model.generate(**enc, max_new_tokens=max_new_tokens,
                         temperature=temperature, top_k=40, do_sample=True)
    return tok.decode(out[0][enc["input_ids"].shape[1]:],
                      skip_special_tokens=True).strip()

print(ask("what's an intelligent agent?"))   # phrasing is flexible
```

## Try the built-in preview questions

The base model ships with a small set of memorized AI-concept answers. Ask them **in your own words**, the point is that exact phrasing doesn't matter:

| Try asking | Observed base-model behavior |
|---|---|
| "What is an intelligent agent?" | **Strongly memorized**, responds with the full structured breakdown ("Let's break down what an intelligent agent is… perception, reasoning, action…") across phrasings |
| "Explain machine learning in simple terms" | **Strongly memorized**, returns the training answer's structure and opening |
| "What is artificial intelligence?" | Memorized concepts (learning, problem-solving, AGI) with some paraphrase drift |
| "What is a neural network?" | Coherent memorized definition, some drift |
| "What is deep learning?" | Coherent short definition, some drift |

The strongly-memorized rows demonstrate the core behavior: one training example, robust retrieval across rephrasings. Fine-tuning on your own pairs moves your content into that strongly-memorized regime.

## Fine-tuning your own predetermined answers

Prepare a text file of Q&A pairs in the chat format:

```
<|user|>
How do I reset my password?
<|assistant|>
Go to Settings → Account → Reset Password. The reset link expires in 15 minutes.
<|endoftext|>
```

Fine-tune with any standard causal-LM loop (the model is a plain `PreTrainedModel`, so `Trainer`, `accelerate`, or a hand-rolled loop all work). At 30M parameters, a full fine-tune runs on a laptop CPU in minutes to hours depending on dataset size. Low learning rates (1e-5 to 5e-5) with a few epochs over your pairs is usually enough; the model is small enough that it will memorize your set quickly while keeping phrasing robustness.

Tips:
- **20–200 pairs per topic cluster** works well; you do *not* need thousands of exact-string variants.
- Keep answers canonical, the model will reproduce the *content* of your answer even when the wording of the question changes.
- Mix in a small amount of generic text if you want to preserve conversational fluency outside your covered topics.

## Available variants

Pick the file that fits your deployment. All produce identical answers; smaller = faster CPU inference.

| File | Size | Use case |
|---|---|---|
| `model.safetensors` | 129 MB | fp32 reference; fine-tuning from this checkpoint |
| `bf16/model.safetensors` | 65 MB | bf16 weights for modern GPUs |
| `gguf/core-predetermined-v1-f16.gguf` | 58 MB | llama.cpp, full precision |
| `gguf/core-predetermined-v1-q8_0.gguf` | 31 MB | llama.cpp, 8-bit, near-lossless |
| `gguf/core-predetermined-v1-q4_k_m.gguf` | **20 MB** | llama.cpp, 4-bit, smaller than most game textures; runs on anything |

**GGUF usage** (llama.cpp, llama-cpp-python, LM Studio, Ollama, etc.):

```bash
llama-completion -m core-predetermined-v1-q4_k_m.gguf \
  -p "<|user|>\nwhat even is ai\n<|assistant|>\n" -n 120
```

## Model details

| | |
|---|---|
| Architecture | `COReForCausalLM` (custom CORe decoder-only transformer) |
| Parameters | 29.7M |
| Layers / heads / width | 8 / 8 / 512 |
| Context length | 512 tokens |
| Tokenizer | 8,192-token BPE, chat-formatted (`<\|user\|>`, `<\|assistant\|>`) |
| Training data | ~12.7M tokens of chat-formatted AI-education text |
| License | Apache-2.0 |

## Limitations

- This is a **30M-parameter model**. It is not a general-purpose assistant and will not compete with large models on open-ended tasks; that is not what it's for. Treat it as a flexible lookup layer over your predetermined content.
- Outside its fine-tuned coverage it will improvise, sometimes incorrectly. For production use, gate responses on confidence or restrict usage to covered topics.
- Training data was English-only; other languages are unsupported.

<sub>The architecture is registered as a first-class custom `COReForCausalLM` model (`model_type: core`) via `trust_remote_code`, no external framework code required beyond `transformers` itself.</sub>