THAU AGI v2 - Proto-AGI System upload
Browse files- README.md +120 -0
- chat_template.jinja +15 -0
- config.json +29 -0
- generation_config.json +7 -0
- model.safetensors +3 -0
- special_tokens_map.json +30 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +43 -0
README.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
- es
|
| 6 |
+
tags:
|
| 7 |
+
- proto-agi
|
| 8 |
+
- react-cycle
|
| 9 |
+
- tool-calling
|
| 10 |
+
- multi-agent
|
| 11 |
+
- fine-tuned
|
| 12 |
+
base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
|
| 13 |
+
pipeline_tag: text-generation
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# THAU AGI v2 - Proto-AGI System
|
| 17 |
+
|
| 18 |
+
**THAU** = **TH**omas + **AU**rora
|
| 19 |
+
|
| 20 |
+
A Proto-AGI (Prototype Artificial General Intelligence) system fine-tuned from TinyLlama-1.1B with specialized training in reasoning, tool calling, and Spanish language support.
|
| 21 |
+
|
| 22 |
+
## Features
|
| 23 |
+
|
| 24 |
+
- **ReAct Cycle**: THINK -> PLAN -> ACT -> OBSERVE -> REFLECT
|
| 25 |
+
- **Experiential Learning**: Learns from past interactions
|
| 26 |
+
- **Metacognition**: Self-evaluation for improvement
|
| 27 |
+
- **Web Search**: Internet search capabilities
|
| 28 |
+
- **Multi-Agent**: Collaboration between specialized agents (CODER, REVIEWER, RESEARCHER, PLANNER, TESTER)
|
| 29 |
+
- **Knowledge Base**: RAG (Retrieval Augmented Generation)
|
| 30 |
+
- **Feedback Loop**: Continuous improvement with user feedback
|
| 31 |
+
- **Tool Calling**: Integrated tools for calculations, file operations, code execution
|
| 32 |
+
- **TTS Support**: Text-to-Speech integration
|
| 33 |
+
- **Image Generation**: Stable Diffusion integration
|
| 34 |
+
- **MCP Integration**: Model Context Protocol support
|
| 35 |
+
|
| 36 |
+
## Available Tools
|
| 37 |
+
|
| 38 |
+
| Tool | Description |
|
| 39 |
+
|------|-------------|
|
| 40 |
+
| `calculate` | Mathematical calculations |
|
| 41 |
+
| `read_file` | Read files |
|
| 42 |
+
| `write_file` | Write files |
|
| 43 |
+
| `list_directory` | List directories |
|
| 44 |
+
| `execute_python` | Execute Python code |
|
| 45 |
+
| `web_search` | Search on internet |
|
| 46 |
+
| `fetch_url` | Get URL content |
|
| 47 |
+
| `research` | Deep research |
|
| 48 |
+
| `text_to_speech` | Convert text to speech |
|
| 49 |
+
| `generate_image` | Generate images |
|
| 50 |
+
|
| 51 |
+
## Operation Modes
|
| 52 |
+
|
| 53 |
+
1. **CHAT**: Casual conversation
|
| 54 |
+
2. **TASK**: Specific tasks with tools
|
| 55 |
+
3. **RESEARCH**: Deep information search
|
| 56 |
+
4. **COLLABORATIVE**: Multi-agent collaboration
|
| 57 |
+
5. **LEARNING**: Intensive learning mode
|
| 58 |
+
|
| 59 |
+
## Usage
|
| 60 |
+
|
| 61 |
+
### With Transformers
|
| 62 |
+
|
| 63 |
+
```python
|
| 64 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 65 |
+
|
| 66 |
+
model = AutoModelForCausalLM.from_pretrained("luepow/thau-agi-v2")
|
| 67 |
+
tokenizer = AutoTokenizer.from_pretrained("luepow/thau-agi-v2")
|
| 68 |
+
|
| 69 |
+
prompt = "<|system|>\nYou are THAU AGI v2, a helpful AI assistant.</s>\n<|user|>\nWhat is 25 * 4 + 100?</s>\n<|assistant|>\n"
|
| 70 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 71 |
+
outputs = model.generate(**inputs, max_new_tokens=200)
|
| 72 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
### With Ollama
|
| 76 |
+
|
| 77 |
+
```bash
|
| 78 |
+
ollama pull luepow/thau:agi-v2
|
| 79 |
+
ollama run luepow/thau:agi-v2
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
### With Gradio Interface
|
| 83 |
+
|
| 84 |
+
```bash
|
| 85 |
+
git clone https://github.com/luepow/thau.git
|
| 86 |
+
cd thau
|
| 87 |
+
pip install -r requirements.txt
|
| 88 |
+
python scripts/gradio_thau_ollama.py
|
| 89 |
+
```
|
| 90 |
+
|
| 91 |
+
## Training Data
|
| 92 |
+
|
| 93 |
+
The model was fine-tuned on:
|
| 94 |
+
- Programming tutorials (Python, JavaScript, Rust, Go, Java)
|
| 95 |
+
- Mathematical reasoning
|
| 96 |
+
- Tool calling patterns
|
| 97 |
+
- Spanish language content
|
| 98 |
+
- DevOps and cloud infrastructure
|
| 99 |
+
- Agile methodologies
|
| 100 |
+
- UX/CSS frameworks
|
| 101 |
+
|
| 102 |
+
## Model Card
|
| 103 |
+
|
| 104 |
+
- **Base Model**: TinyLlama/TinyLlama-1.1B-Chat-v1.0
|
| 105 |
+
- **Parameters**: 1.1B
|
| 106 |
+
- **Context Length**: 4096 tokens
|
| 107 |
+
- **Languages**: English, Spanish
|
| 108 |
+
- **License**: MIT
|
| 109 |
+
|
| 110 |
+
## Links
|
| 111 |
+
|
| 112 |
+
- **GitHub**: https://github.com/luepow/thau
|
| 113 |
+
- **Ollama**: https://ollama.com/luepow/thau
|
| 114 |
+
- **Support**: Buy Me a Coffee - luepowg
|
| 115 |
+
|
| 116 |
+
## Credits
|
| 117 |
+
|
| 118 |
+
Developed with love for Thomas & Aurora.
|
| 119 |
+
|
| 120 |
+
**THAU** = **TH**omas + **AU**rora
|
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": "bfloat16",
|
| 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:6e6001da2106d4757498752a021df6c2bdc332c650aae4bae6b0c004dcf14933
|
| 3 |
+
size 2200119864
|
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": false,
|
| 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 |
+
}
|