luepow commited on
Commit
d994e1e
·
verified ·
1 Parent(s): 70809c4

Add model card with v2.0 documentation

Browse files
Files changed (1) hide show
  1. README.md +93 -66
README.md CHANGED
@@ -1,61 +1,55 @@
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
 
@@ -67,61 +61,94 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
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*
 
 
 
1
  ---
2
+ license: apache-2.0
3
  language:
4
  - es
5
  - en
 
6
  tags:
7
  - llm
 
 
 
8
  - self-learning
9
  - tool-calling
10
+ - spanish
11
+ - tinyllama
12
+ - lora
13
  base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
14
+ model-index:
15
+ - name: thau
16
+ results: []
17
  ---
18
 
19
+ # THAU v2.0 - Self-Learning Language Model
20
 
21
+ **THAU** (Thinking, Helpful, Autonomous, Understanding) is a self-learning language model fine-tuned from TinyLlama-1.1B with specialized training in tool calling, reasoning, and Spanish.
22
 
23
  ## Model Description
24
 
25
+ | Attribute | Value |
 
 
 
 
 
 
 
 
 
 
 
26
  |-----------|-------|
27
+ | **Base Model** | TinyLlama-1.1B-Chat-v1.0 |
28
+ | **Parameters** | ~1.1B |
29
+ | **Training Method** | LoRA Fine-tuning |
30
+ | **Final Loss** | 0.43 |
31
+ | **Languages** | Spanish (primary), English |
32
+ | **License** | Apache 2.0 |
33
+
34
+ ## Capabilities
35
+
36
+ - **Tool Calling**: Native JSON-based function invocation
37
+ - **Chain of Thought**: Step-by-step reasoning for complex problems
38
+ - **Image Generation**: Prompt engineering for image generation
39
+ - **Spanish Fluency**: Natural and technical conversations
40
+ - **Programming**: Python, JavaScript, Java assistance
41
+
42
+ ## Training Data
43
+
44
+ | Category | Examples |
45
+ |----------|----------|
46
+ | Tool Calling | 112 |
47
+ | Spanish Natural/Technical | 52 |
48
+ | Image Generation | 30 |
49
+ | Conversational Spanish | 20 |
50
+ | Chain of Thought Reasoning | 20 |
51
+ | Programming | 30+ |
52
+ | **Total** | **297 specialized examples** |
53
 
54
  ## Usage
55
 
 
61
  model = AutoModelForCausalLM.from_pretrained("luepow/thau")
62
  tokenizer = AutoTokenizer.from_pretrained("luepow/thau")
63
 
64
+ # Chat format
65
+ prompt = """<|system|>
66
+ Eres THAU, un asistente AI inteligente y servicial.</s>
67
+ <|user|>
68
+ Hola, quien eres?</s>
69
+ <|assistant|>
70
+ """
71
+
72
  inputs = tokenizer(prompt, return_tensors="pt")
73
+ outputs = model.generate(**inputs, max_length=200, temperature=0.7)
74
  print(tokenizer.decode(outputs[0], skip_special_tokens=True))
75
  ```
76
 
77
+ ### With Ollama (Recommended)
78
 
79
  ```bash
80
+ ollama pull luepow/thau
81
+ ollama run luepow/thau
 
 
 
82
  ```
83
 
84
+ ## Tool Calling Format
85
 
86
+ THAU uses a JSON-based tool calling format:
87
 
88
  ```
89
  <tool_call>{"name": "tool_name", "arguments": {"param": "value"}}</tool_call>
90
  ```
91
 
92
+ ### Available Tools
93
+
94
+ | Tool | Description |
95
+ |------|-------------|
96
+ | `get_current_time` | Get current date/time |
97
+ | `web_search` | Search the internet |
98
+ | `execute_python` | Run Python code |
99
+ | `generate_image` | Generate image from prompt |
100
+ | `read_file` | Read file contents |
101
+ | `list_directory` | List directory contents |
102
+
103
+ ### Example
104
+
105
+ **User**: What time is it?
106
+
107
+ **THAU**:
108
+ ```
109
+ <tool_call>{"name": "get_current_time", "arguments": {}}</tool_call>
110
+ ```
111
 
112
  ## Limitations
113
 
114
+ - Model size limits complex multi-step reasoning
115
  - May hallucinate on topics outside training data
116
+ - Tool calling accuracy varies by complexity
117
+ - Spanish is the primary language; English is secondary
118
+ - Best for simple to moderate complexity tasks
119
 
120
+ ## Training Details
121
 
122
+ - **Full Training**: 3,022 data points, 4,533 steps, loss 0.94
123
+ - **Specialized v2.0**: 297 examples, 745 steps, loss 0.43
124
+ - **Hardware**: Apple Silicon (MPS)
125
+ - **Training Time**: ~7 minutes for specialized phase
126
 
127
  ## Citation
128
 
129
  ```bibtex
130
  @misc{thau2024,
131
+ title={THAU v2.0: A Self-Learning Language Model},
132
+ author={Luis Perez (luepow)},
133
  year={2024},
134
  url={https://huggingface.co/luepow/thau}
135
  }
136
  ```
137
 
138
+ ## Links
139
+
140
+ - **Ollama**: [luepow/thau](https://ollama.com/luepow/thau)
141
+ - **GitHub**: [luepow/thau](https://github.com/luepow/thau)
142
 
143
+ ## Acknowledgments
144
+
145
+ - **Thomas & Aurora** - Inspiration for the cognitive age progression system
146
+ - **Claude (Anthropic)** - AI pair programming partner
147
+ - **TinyLlama Team** - Excellent base model
148
+ - **Hugging Face** - Model hosting and transformers library
149
 
150
  ---
151
 
152
+ *THAU v2.0 - Built with incremental learning and specialized training*
153
+
154
+ *Dedicated to Thomas & Aurora*