luepow commited on
Commit
e071cdf
·
verified ·
1 Parent(s): 6a30b70

Upload THAU model - 2025-11-27 08:06

Browse files
README.md ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - es
4
+ - en
5
+ license: apache-2.0
6
+ tags:
7
+ - llm
8
+ - conversational
9
+ - text-generation
10
+ - thau
11
+ - self-learning
12
+ - tool-calling
13
+ library_name: transformers
14
+ pipeline_tag: text-generation
15
+ base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
16
+ ---
17
+
18
+ # THAU - Self-Learning Language Model
19
+
20
+ <img src="https://img.shields.io/badge/THAU-LLM-blue" alt="THAU LLM">
21
+
22
+ ## Model Description
23
+
24
+ **THAU** (Thinking, Helpful, Autonomous, Understanding) is a self-learning language model with incremental training capabilities. Built on top of TinyLlama, THAU has been fine-tuned using a unique "cognitive age" progression system.
25
+
26
+ ### Key Features
27
+
28
+ - **Self-Learning**: Learns from interactions and self-generated Q&A
29
+ - **Tool Calling**: Supports MCP (Model Context Protocol) for tool invocation
30
+ - **Bilingual**: Trained primarily in Spanish with English support
31
+ - **Lightweight**: ~2048M parameters, runs on consumer hardware
32
+
33
+ ## Model Architecture
34
+
35
+ | Parameter | Value |
36
+ |-----------|-------|
37
+ | Hidden Size | 2048 |
38
+ | Layers | 22 |
39
+ | Vocabulary Size | 32000 |
40
+ | Model Type | llama |
41
+ | Base Model | TinyLlama-1.1B-Chat |
42
+
43
+ ## Training
44
+
45
+ THAU uses a progressive "cognitive age" training system:
46
+
47
+ - **Age 0-3**: Basic language, simple patterns
48
+ - **Age 4-6**: Grammar, vocabulary expansion
49
+ - **Age 7-9**: Reasoning, logic
50
+ - **Age 10-12**: Advanced topics, programming
51
+ - **Age 13-15**: Specialized knowledge, tool use
52
+
53
+ ### Training Data
54
+
55
+ - Self-generated Q&A pairs via Ollama teachers
56
+ - Programming tutorials (Python, JavaScript, C++, etc.)
57
+ - Tool calling examples (MCP format)
58
+ - General knowledge across multiple domains
59
+
60
+ ## Usage
61
+
62
+ ### With Transformers
63
+
64
+ ```python
65
+ from transformers import AutoModelForCausalLM, AutoTokenizer
66
+
67
+ model = AutoModelForCausalLM.from_pretrained("luepow/thau")
68
+ tokenizer = AutoTokenizer.from_pretrained("luepow/thau")
69
+
70
+ prompt = "Hola, que puedes hacer?"
71
+ inputs = tokenizer(prompt, return_tensors="pt")
72
+ outputs = model.generate(**inputs, max_new_tokens=100)
73
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
74
+ ```
75
+
76
+ ### With Ollama
77
+
78
+ ```bash
79
+ # Download and convert
80
+ ollama pull thau
81
+
82
+ # Or create from GGUF
83
+ ollama create thau -f Modelfile
84
+ ```
85
+
86
+ ### Tool Calling Format
87
+
88
+ THAU supports tool calling with this format:
89
+
90
+ ```
91
+ <tool_call>{"name": "tool_name", "arguments": {"param": "value"}}</tool_call>
92
+ ```
93
+
94
+ Example tools: `get_current_time`, `web_search`, `execute_python`, `generate_image`
95
+
96
+ ## Limitations
97
+
98
+ - Model size limits complex reasoning
99
+ - May hallucinate on topics outside training data
100
+ - Tool calling accuracy depends on training quality
101
+ - Spanish-primary, English secondary
102
+
103
+ ## Ethical Considerations
104
+
105
+ This model was trained on self-generated data and open datasets. It should not be used for:
106
+ - Generating harmful or misleading content
107
+ - Impersonating real individuals
108
+ - Making critical decisions without human oversight
109
+
110
+ ## Citation
111
+
112
+ ```bibtex
113
+ @misc{thau2024,
114
+ title={THAU: A Self-Learning Language Model},
115
+ author={THAU Team},
116
+ year={2024},
117
+ url={https://huggingface.co/luepow/thau}
118
+ }
119
+ ```
120
+
121
+ ## License
122
+
123
+ Apache 2.0
124
+
125
+ ---
126
+
127
+ *THAU - Built with incremental learning and cognitive progression*
chat_template.jinja ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% for message in messages %}
2
+ {% if message['role'] == 'user' %}
3
+ {{ '<|user|>
4
+ ' + message['content'] + eos_token }}
5
+ {% elif message['role'] == 'system' %}
6
+ {{ '<|system|>
7
+ ' + message['content'] + eos_token }}
8
+ {% elif message['role'] == 'assistant' %}
9
+ {{ '<|assistant|>
10
+ ' + message['content'] + eos_token }}
11
+ {% endif %}
12
+ {% if loop.last and add_generation_prompt %}
13
+ {{ '<|assistant|>' }}
14
+ {% endif %}
15
+ {% endfor %}
config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "dtype": "float16",
9
+ "eos_token_id": 2,
10
+ "head_dim": 64,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 2048,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 5632,
15
+ "max_position_embeddings": 2048,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 32,
19
+ "num_hidden_layers": 22,
20
+ "num_key_value_heads": 4,
21
+ "pretraining_tp": 1,
22
+ "rms_norm_eps": 1e-05,
23
+ "rope_scaling": null,
24
+ "rope_theta": 10000.0,
25
+ "tie_word_embeddings": false,
26
+ "transformers_version": "4.57.1",
27
+ "use_cache": true,
28
+ "vocab_size": 32000
29
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 1,
3
+ "eos_token_id": 2,
4
+ "max_length": 2048,
5
+ "pad_token_id": 0,
6
+ "transformers_version": "4.57.1"
7
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fbdb7ccbf122261dfb0d113613de2a872f732d2e4e33e403b7d438f9e2bafe03
3
+ size 2200119664
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<unk>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
+ size 499723
tokenizer_config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": true,
4
+ "add_prefix_space": null,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ }
30
+ },
31
+ "bos_token": "<s>",
32
+ "clean_up_tokenization_spaces": false,
33
+ "eos_token": "</s>",
34
+ "extra_special_tokens": {},
35
+ "legacy": false,
36
+ "model_max_length": 2048,
37
+ "pad_token": "</s>",
38
+ "padding_side": "right",
39
+ "sp_model_kwargs": {},
40
+ "tokenizer_class": "LlamaTokenizer",
41
+ "unk_token": "<unk>",
42
+ "use_default_system_prompt": false
43
+ }