Posts

Showing posts from November, 2025

AI with two brains - catastrophic forgetting solved

  Brain 1 – General knowledge A pretrained foundation model (e.g., Llama‑2, 7‑13 B) that already knows English, basic math, common‑sense facts, etc. It stays static so it never loses the broad knowledge it was trained on. Brain 2 – Domain‑specific, continuously refreshed A lightweight component that learns from your daily 1 GB corpus. It can be implemented as: a retrieval index (FAISS/Chroma) that stores embeddings of the fresh documents, or a fine‑tuned adapter (LoRA/QLoRA) that gets updated each night with the new data. Because only this part changes, you avoid catastrophic forgetting in the general brain. How they interact A small router (a few‑shot classifier or a rule‑based switch) decides, for each query, whether to: answer directly from Brain 1, or pull the most relevant chunks from Brain 2 (retrieval) and feed them together with the question to Brain 1 for a grounded answer. Practical stack you could use General LLM – meta-llama/Llama-2-7b-chat (run locally via Ollama o...

AI parts architecture - transformer framework - tensorflow

 architecture - transformer  framework - tensorflow

wordnet for grouping words as per english grammer -- for sentiment or to understand - python

 word net 

Old style AI or bots - rule based - pattern matching -- simple Rnns

  Older bots relied on rule‑based scripts or recurrent networks, and some niche systems still use simpler pattern‑matching. Before transformers, most language‑processing models relied on  recurrent neural networks  (RNNs) and their variants: Simple RNNs – processed text word‑by‑word, keeping a hidden state that captured previous context. LSTMs and GRUs – introduced gating mechanisms to better retain long‑range information and mitigate the vanishing‑gradient problem. Seq2seq architectures – paired an encoder RNN with a decoder RNN for tasks like translation; attention was later added to let the decoder focus on specific encoder states. Convolutional neural networks (CNNs) were also used for tasks such as sentence classification, applying filters over word embeddings. These approaches were the backbone of NLP until the transformer’s self‑attention mechanism proved far more effective at handling long‑range dependencies.

RNN Recurrent Neural Network - ai -seequnetial - for predictive power

  An RNN, or   Recurrent Neural Network , artificial neural network - sequential data - information from previous inputs. stock prices,  Natural Language Processing (NLP):  Used for tasks like email autocomplete, language translation, sentiment analysis, and named entity recognition. Time series forecasting:  Predicting future values in a sequence, such as stock prices or weather patterns. Speech recognition:  Understanding and transcribing spoken language. Video analysis:  Understanding the content of video sequences.   Types of RNNs

Transformers outside python openvino transformer apis - ai

  How a transformer can live outside Python Compiled inference runtimes – a pretrained model can be exported to a platform‑independent format (ONNX, TensorRT, OpenVINO, Core ML, etc.). Those files are then loaded by a lightweight C/C++ runtime that does the matrix math, so the only “installation” is the runtime library. Native code implementations – you can write the transformer architecture yourself in C++, Rust, Java, Go, etc., and link it with a BLAS/LBLAS library (Intel MKL, OpenBLAS, etc.). The model weights are just numbers that you read from a file. Hardware‑specific pipelines – some chips (GPUs, TPUs, neuromorphic boards) have their own SDKs that accept a transformer graph and run it without any Python stack. No‑code platforms – services like Hugging Face Inference API, AWS SageMaker, Google Vertex AI, or Azure OpenAI let you call a transformer via a REST endpoint; you never install anything locally.