πΌ Engineer & Entrepreneur
π I also write daily for my 112k+ readers on actionable AI developments.
ποΈ Sign up for my Newsletter β https://t.co/Jfj0r0wLUN
4 subscribers
Feb 20 β’ 8 tweets β’ 4 min read
NVIDIA + Arc Institute's new model Evo 2 just demonstrated that deep learning can directly model biological function
It stands as a breakthrough in computational biology,
𧡠1/n
EvoΒ 2 just redefined genomic modeling by processing over 9 trillion nucleotides to seamlessly connect molecular detail with genome-scale structure.
Whats more, the entire model, training code, inference code, and curated OpenGenome2 dataset are released under open terms to accelerate progress in AI-driven genomics.
--------
Genome engineering efforts need a general-purpose model that can capture molecular, cellular, and organism-level features from DNA alone. This project addresses that gap by creating Evo 2, a foundation model trained on over 9 trillion DNA bases, covering bacteria, archaea, eukaryotes, and phage.
Its capacity for a 1-million token context window ensures that both local motifs and long-range dependencies are captured in a single pass. This design allows EvoΒ 2 to model everything from single-nucleotide mutations to whole-genome architecture without task-specific tuning.
It learns diverse genetic patterns without labels or alignments, working at scales from small coding regions to entire genomes.
--------
What's the key benefit of it for us
It means that Evo 2 automatically detects key genetic signals and accurately predicts how various mutations impact molecular and organismal function.
The model's breakthroughs can lead to better disease diagnosis, more effective treatments, and improved agricultural or environmental solutions
𧡠2/n
π Model Architecture and Training Pipeline
StripedHyena 2 forms the core of Evo 2. It is a multi-hybrid convolutional architecture, mixing short, medium, and long input-dependent convolution layers with attention blocks.
This design handles sequences of up to 1 million tokens.
Training proceeded in two stages: a pretraining phase (8,192-token context) followed by midtraining that progressively extended context length (up to 1M tokens).
Data weighting placed extra emphasis on functionally dense regions (genic windows) before switching to full-genome segments.
And this is with @firecrawl_dev Extract, the new feature they just launched and I am finding it just incredibly helpful in my daily work.
π§΅1/n
It reimagines web scraping. Using natural language, you can now extract data from single pages, entire domains (with wildcards), and even JavaScript-heavy sites β all without scripting.
Open beta is live, and it's the greatest simplifications of the web-scraping job.
No more fighting with selectors and XPath queries. Firecrawl Extract uses the power of LLMs to understand the data needs and intelligently pull information from the web, turning messy HTML into clean, structured data ready for your applications.
Imagine telling a tool, "Extract the product name, price, and customer reviews from this page," and having it deliver exactly that β in a neat, structured format like JSON.
What Makes Extract so Powerful?
It's a smart data extraction engine.
- Adaptable to Website Changes: Websites are constantly evolving. Traditional scripts break when layouts change. Extract, is designed to be more resilient and adapt to minor website tweaks without needing constant script rewrites.
- Scalable Data Collection: Extract isn't limited to single pages. You can target multiple URLs, entire domains using wildcards, and even leverage web search to enrich your data.
- Seamless Integration: It offers:
β Zapier Integration: Connect Extract to thousands of apps for automated workflows, data enrichment, and pushing data into your favorite CRMs or spreadsheets β all without writing a single line of code.
β Python and Node.js SDKs: For developers who want more control, SDKs provide easy integration into existing projects.
- Handles Dynamic Content: Websites are increasingly dynamic, relying heavily on JavaScript. Extract leverages Firecrawl's robust `/scrape` endpoint to render JavaScript-heavy pages, ensuring you capture data even from complex modern websites.
- Extract can be used to efficiently gather datasets from the web for LLM training, handling multilingual sites and dynamic content like prices and inventory.
𧡠2/n
This example uses DeepSeek R1 as web crawler with @firecrawl_dev 's /extract.
Watch R1 select URLs and filter results while /extract scans for the structured data on the websites.
Jan 17 β’ 6 tweets β’ 3 min read
Your brain's next 5 seconds, predicted by AI
Transformer predicts brain activity patterns 5 seconds into future using just 21 seconds of fMRI data
Achieves 0.997 correlation using modified time-series Transformer architecture
-----
π§ Original Problem:
Predicting future brain states from fMRI data remains challenging, especially for patients who can't undergo long scanning sessions. Current methods require extensive scan times and lack accuracy in short-term predictions.
-----
π¬ Solution in this Paper:
β The paper introduces a modified time series Transformer with 4 encoder and 4 decoder layers, each containing 8 attention heads
β The model takes a 30-timepoint window covering 379 brain regions as input and predicts the next brain state
β Training uses Human Connectome Project data from 1003 healthy adults, with preprocessing including spatial smoothing and bandpass filtering
β Unlike traditional approaches, this model omits look-ahead masking, simplifying prediction for single future timepoints
-----
π― Key Insights:
β Temporal dependencies in brain states can be effectively captured using self-attention mechanisms
β Short input sequences (21.6s) suffice for accurate predictions
β Error accumulation follows a Markov chain pattern in longer predictions
β The model preserves functional connectivity patterns matching known brain organization
-----
π Results:
β Single timepoint prediction achieves MSE of 0.0013
β Accurate predictions up to 5.04 seconds with correlation >0.85
β First 7 predicted timepoints maintain high accuracy
β Outperforms BrainLM with 20-timepoint MSE of 0.26 vs 0.568
Paper Title: "Predicting Human Brain States with Transformer"
Generated below podcast on this paper with Google's Illuminate.
Dec 23, 2024 β’ 8 tweets β’ 4 min read
Most valuable data exists in PDFs, images, and other formats LLMs can't directly process, creating a critical barrier to AI adoption across industries.
And converting documents into LLM-compatible formats requires complex technical pipelines, while existing vision models often deliver subpar reasoning capabilities.
To solve this problem, @FireworksAI_HQ just released Document Inlining.
ποΈResult - OSS models with Document Inlining achieving a 68% win rate against GPT-4o at document processing.
A Threadπ§΅(1/n)
Document Inlining turns ANY LLM into a vision model to excel at processing documents, providing
- Higher quality - Better reasoning by feeding text into text models.
- Input flexibility - Automatically handles rich document structure like tables/charts and takes PDFs and multiple images as inputs
- Ultra-simple usage - Works through a 1-line edit to their OpenAI-compatible API
- Model flexibility - Use any LLM, including fine-tuned and specialized models
π§΅(2/n)
Read more or get started in their UI playground now!
API is fully OpenAI compatible. Enable this capability by editing 1-line to specify β#transform=inlineβ alongside your file fireworks.ai/blog/document-β¦
Dec 12, 2024 β’ 5 tweets β’ 3 min read
Synthetic data and iterative self-improvement is all you need.
No humans needed in the evaluation loop.
This paper introduces a self-improving evaluator that learns to assess LLM outputs without human feedback, using synthetic data and iterative self-training to match top human-supervised models.
-----
Original Problem π€:
Building strong LLM evaluators typically requires extensive human preference data, which is costly and becomes outdated as models improve. Current approaches rely heavily on human annotations, limiting scalability and adaptability.
-----
Solution in this Paper π§:
β The method starts with unlabeled instructions and uses a seed LLM to generate contrasting response pairs, where one is intentionally inferior.
β It then uses an LLM-as-Judge approach to generate reasoning traces and final judgments for these synthetic pairs.
β The system filters correct judgments and uses them to train an improved evaluator model.
β This process repeats iteratively, with each iteration using the improved model to generate better synthetic training data.
-----
Key Insights from this Paper π‘:
β Human preference data isn't necessary for training strong LLM evaluators
β Synthetic data generation with iterative self-improvement can match human-supervised approaches
β Different data sources (safety, math, coding) improve performance in their respective domains
-----
Results π:
β Improved RewardBench accuracy from 75.4 to 88.3 (88.7 with majority voting)
β Outperformed GPT-4 (84.3) and matched top reward models trained with human data
β Achieved 79.5% agreement with human judgments on MT-Bench using majority voting
The diagram shows how an AI system learns to evaluate responses without human help, using an iterative training process:
1. Input Stage π―
- It starts with a prompt (x)
- Creates a similar but slightly different version of that prompt (x')
2. Response Generation π
- The system uses an LLM to create two responses:
- A "good" response to the original prompt
- A "bad" response by answering the modified prompt
3. Judgment Phase π
- An AI judge (Mi) evaluates these responses
- It samples multiple judgments about which response is better
- The system selects only the correct verdicts
4. Training Loop βοΈ
- These judgments are collected as training data
- The system uses this data to train an improved version of itself (Mi+1)
- This new, better model becomes the judge for the next round
Think of it like a student who: 1. Creates their own practice problems 2. Solves them in both good and not-so-good ways 3. Learns to tell the difference between good and bad solutions 4. Uses this knowledge to get even better at judging solutions
The key innovation is that this entire process runs automatically, without needing humans to say which answers are good or bad. The system teaches itself to become a better evaluator through practice and iteration.
Dec 10, 2024 β’ 4 tweets β’ 2 min read
Beautiful Opensource Tool, ScrapeGraphAI with 16.2K Github stars π
Turns natural language commands into production-ready web scrapers using LLM-powered graph pipelines.
This library stands out by integrating Large Language Models (LLMs) and modular graph-based pipelines to automate the scraping of data from various sources (e.g., websites, local files etc.
Why ScrapegraphAI β
Traditional web scraping tools often rely on fixed patterns or manual configuration to extract data from web pages. ScrapegraphAI, leveraging the power of LLMs, adapts to changes in website structures, reducing the need for constant developer intervention.
β ScrapeGraphAI builds web scraping pipelines using LLMs and directed graph logic.
β It extracts information from websites and local documents (XML, HTML, JSON, Markdown) through simple natural language prompts.
β Supports OpenAI, Groq, Azure, Gemini APIs and local Ollama models. Features parallel LLM calls, multi-language support, and integrates with browsers through Playwright. Built for production use with comprehensive testing and CI/CD.
π» Usage
There are multiple standard scraping pipelines that can be used to extract information from a website (or local file).
The most common one is the `SmartScraperGraph`, which extracts information from a single page given a user prompt and a source URL.
Dec 3, 2024 β’ 4 tweets β’ 3 min read
HunyuanVideo: Open-source alternative to Runway Gen-3, Luma 1.6, few others top performing Chinese video generative models just arrived. π€―
π― A 13B-parameter open-source video generator model from by Tencent that matches commercial quality π
β HunyuanVideo represents a major advancement in open-source video generation, released by Tencent in December 2024 with public code and model weights
β The model matches or exceeds closed-source solutions while being fully accessible to researchers and developers
β Running on H800/H20 GPUs, it requires 45-60GB memory depending on resolution settings
π¬ Architecture
β The foundation is a Causal 3D VAE that intelligently compresses videos with specific ratios - 4x for time dimension, 8x for spatial dimensions, and 16x for channels
β Unlike traditional approaches using CLIP/T5, HunyuanVideo employs a decoder-only Multimodal LLM as its text encoder, enabling better image-text alignment and complex reasoning
β The architecture follows a novel dual-stream to single-stream progression - first processing video and text independently, then merging them for enhanced multimodal fusion
β A sophisticated prompt rewriting system offers two modes: Normal for better understanding user intent, and Master for enhancing visual quality aspects
π οΈ Implementation Details
β Supports various aspect ratios including 9:16, 16:9, 4:3, 3:4, and 1:1 with resolutions up to 720p
β Uses flow matching for training with a configurable shift factor of 9.0 and embedded classifier-free guidance
β Provides CPU offloading capabilities to manage memory efficiently during high-resolution generation
π Performance Metrics
β Professional evaluation across 1,533 prompts shows superior results: 68.5% text alignment, 64.5% motion quality, 96.4% visual quality
Dec 1, 2024 β’ 4 tweets β’ 2 min read
Emotional RAG: AI now recall memories based on emotions, just like humans do.
Original Problem π€:
Role-playing agents powered by LLMs struggle to maintain consistent personality traits and generate human-like responses due to limited emotional context in memory retrieval.
-----
Solution in this Paper π‘:
β’ Introduces Emotional RAG framework for role-playing agents
β’ Encodes both semantic and emotional vectors for queries and memory
β’ Implements two retrieval strategies:
- Combination: Fuses semantic and emotional similarity scores
- Sequential: Retrieves based on one factor, then reranks using the other
β’ Designs emotion-aware prompt templates for LLMs
-----
Key Insights from this Paper:
β Incorporating emotional states in memory retrieval enhances personality consistency
β Mood-Dependent Memory theory from psychology applies to AI agents
β Different retrieval strategies work best for different personality evaluation metrics
β Emotional congruence improves the human-likeness of generated responses
-----
Results π:
β’ Outperforms traditional RAG methods across multiple datasets
β’ Significant improvements in full personality evaluations (MBTI, BFI)
β’ Better performance on open-source models (ChatGLM-6B, Qwen-72B) compared to GPT-3.5
β’ Achieves higher accuracy in overall personality trait predictions
πEmotional RAG framework consists of four main components:
β Query encoding: Encodes both semantic and emotional aspects of user queries
β Memory encoding: Stores and encodes conversation history with semantic and emotional vectors
β Emotional retrieval: Retrieves relevant memory based on both semantic and emotional similarity
β Response generation: Uses retrieved memory along with character profile to generate responses
Nov 25, 2024 β’ 6 tweets β’ 3 min read
Type a sentence, get any sound - from talking cats to singing saxophones. Brilliant release by NVIDIA
β¨ NVIDIA just unveiled Fugatto, a groundbreaking 2.5B parameter audio AI model that can generate and transform any combination of music, voices, and sounds using text prompts and audio inputs
Fugatto could ultimately allow developers and creators to bring sounds to life simply by inputting text prompts,
β The model demonstrates unique capabilities like creating hybrid sounds (trumpet barking), changing accents/emotions in voices, and allowing fine-grained control over sound transitions - trained on millions of audio samples using 32 NVIDIA H100 GPUs
π¨βπ§ Architecture
Built as a foundational generative transformer model leveraging NVIDIA's previous work in speech modeling and audio understanding. The training process involved creating a specialized blended dataset containing millions of audio samples
β ComposableART's Innovation in Audio Control
Introduces a novel technique allowing combination of instructions that were only seen separately during training. Users can blend different audio attributes and control their intensity
β Temporal Interpolation Capabilities
Enables generation of evolving soundscapes with precise control over transitions. Can create dynamic audio sequences like rainstorms fading into birdsong at dawn
β Processes both text and audio inputs flexibly, enabling tasks like removing instruments from songs or modifying specific audio characteristics while preserving others
β Shows capabilities beyond its training data, creating entirely new sound combinations through interaction between different trained abilities
π Real-world Applications
β Allows rapid prototyping of musical ideas, style experimentation, and real-time sound creation during studio sessions
β Can modify voice characteristics for language learning applications, allowing content delivery in familiar voices
@NVIDIAAIDev
β Creates a massive dataset (20M+ rows, ~330 years of audio) by combining multiple open source datasets and using LLMs to generate rich descriptions and instructions
Nov 16, 2024 β’ 14 tweets β’ 5 min read
Consolidated insights on LLM fine-tuning - a long read across 114 pages.
"Ultimate Guide to Fine-Tuning LLMs"
Worth a read during the weekend.
Few ares it covers π
π Fine-tuning Pipeline
β Outlines a seven-stage process for fine-tuning LLMs, from data preparation to deployment and maintenance.
π§ Advanced Fine-tuning Methods
β Covers techniques like Proximal Policy Optimization (PPO) and Direct Preference Optimization (DPO) for aligning LLMs with human preferences.
β Discusses methods like LoRA, QLoRA, and adapters that enable efficient fine-tuning by updating only a subset of model parameters.
π¬ Evaluation metrics and benchmarks for assessing fine-tuned LLMs
β Includes perplexity, accuracy, and task-specific measures. Benchmarks like GLUE, SuperGLUE, TruthfulQA, and MMLU assess various aspects of LLM performance. Safety evaluations using frameworks like DecodingTrust are also crucial for ensuring responsible AI deployment.
π» Explores various deployment approaches and optimization techniques to enhance LLM performance and efficiency in real-world applications.
π Examines the extension of fine-tuning techniques to multimodal models and domain-specific applications in fields like medicine and finance.
Note, the content's value stands on its merit, even though possibly the authors leveraged AI assistance in some parts of the paper's creation.
𧡠1/n
𧡠2/n
A chronological timeline showcasing the evolution of LLMs from 1990 to 2023.
Nov 8, 2024 β’ 4 tweets β’ 2 min read
MapReduce meets LLMs: Divide-and-conquer approach lets regular LLMs process 100x longer documents than their context limit
Using MapReduce principles, small-context LLMs now handle million-token documents efficiently.
Original Problem π:
LLMs struggle to process extremely long texts exceeding their context window, limiting their application in tasks requiring comprehensive document understanding.
-----
Solution in this Paper π οΈ:
β’ LLM Γ MapReduce: A training-free framework for long-sequence processing
β’ Structured information protocol: Addresses inter-chunk dependency
β’ In-context confidence calibration: Resolves inter-chunk conflicts
β’ Three-stage process: Map, collapse, and reduce stages for efficient processing
-----
Key Insights from this Paper π‘:
β’ Divide-and-conquer approach enables short-context LLMs to handle long texts
β’ Structured information and confidence calibration improve cross-chunk processing
β’ Framework is compatible with different LLMs, demonstrating generalization capability
β’ Efficient design outperforms standard decoding in speed
The LLM Γ MapReduce framework consists of three main stages:
1. Map stage: The long input text is divided into chunks, and an LLM extracts necessary information from each chunk.
2. Collapse stage: If the mapped results still exceed the model's context window, they are compressed while maintaining the same structure as the mapped results.
3. Reduce stage: The final response is generated based on the collapsed results.
Nov 6, 2024 β’ 6 tweets β’ 2 min read
"Understanding LLMs from Scratch Using Middle School Math"
Neural networks learn to predict text by converting words to numbers and finding patterns through attention mechanisms.
So the network turns words into numbers, then use attention to decide what's important for predicting next words
Nice long blog (40 minuted reading time), check the link in comment.
Content
Nov 4, 2024 β’ 11 tweets β’ 3 min read
For learning Machine Learning with actual projects, checkout this Repo.
A comprehensive educational repository from @AnthropicAI containing 5 structured courses: API fundamentals, prompt engineering, real-world applications, evaluations, and tool integration with Claude APIs.
Anthropic API fundamentals
Nov 1, 2024 β’ 5 tweets β’ 3 min read
Not all brain cells are equal - same goes for LLM attention heads! π‘
Why store everything when you can just remember the important stuff?
Smart KV cache compression that knows which attention heads matter most.
Hence, HeadKV intelligently compresses LLM memory by identifying and prioritizing crucial attention heads
π― Original Problem:
KV caching in LLMs faces significant memory overhead with increasing input length. Current compression methods operate at layer-level, missing the opportunity to optimize at individual attention head level.
-----
π§ Solution in this Paper:
β’ HeadKV: Compresses KV cache at individual head level instead of layer level
β’ Allocates cache budgets based on head importance using Needle-in-a-Haystack tests
β’ HeadKV-R2: Enhanced version that evaluates both retrieval and reasoning abilities
β’ Uses dynamic budget allocation across heads based on importance scores
β’ Retains most relevant KV cache entries within each head using attention-based selection
-----
π‘ Key Insights:
β’ Not all attention heads are equally important for text generation
β’ Head-level compression outperforms layer-level approaches
β’ Combining retrieval and reasoning abilities for importance scoring is crucial
β’ Dynamic budget allocation across heads is more effective than fixed allocation
β’ Just 1.5% of KV cache can retain 97% of full performance
-----
π Results:
β’ Achieves 97% of full KV cache performance while retaining only 1.5% of cache
β’ Outperforms baselines on LongBench and LooGLE benchmarks
β’ Superior performance in low-resource settings (KV size = 64 & 128)
β’ Maintains computational efficiency comparable to existing approaches
β’ Effective preservation of both retrieval and reasoning capabilities
π The method operates in two key steps: First, it estimates head importance scores using Needle-in-a-Haystack tests that evaluate both retrieval and reasoning abilities.
Second, it allocates KV cache budgets to individual heads based on their importance scores, with more important heads receiving larger cache allocations.
Oct 28, 2024 β’ 4 tweets β’ 2 min read
GenAI implementation poses a series of hurdles to overcome.
Vector DBs, data processing pipelines, embedding models, deployment systems, and monitoring tools and many more.
All these create significant engineering complexity.
A 𧡠1/n
So if I have a all-in-one GenAI development toolkit operating on owned infrastructure, that would eliminate all these unnecessary pressure and stumbling blocks from implementing a new GenAI project.
And then I found such a solution: @DynamiqAGI β¨
And what's great is that it is open-source with Apache 2 License.
So Dynamiq simplifies my AI-powered solution development cycle significantly.
It handles Multi-agent orchestration and Retrieval-Augmented Generation (RAG) integration with a comprehensive toolkit.
Core capabilities: π¨βπ§
-> Agent orchestration: Single and multi-agent workflow support
-> RAG toolkit: Vector DB integration, chunking, pre-processing, reranking
-> DAG workflow control: Parallel execution, retries, error handling
-> Custom validators: Configurable validation rules for workflows
-> Multi-modal integration: Support for Vision-Language Models (VLMs)
Also good for scalability, from prototype to enterprise.
𧡠2/n
Here's a simple example to get you started with @DynamiqAGI :
Oct 26, 2024 β’ 8 tweets β’ 2 min read
MIT's "Mathematics for Computer Science".
A 1048 page available for Free.
Focuses on explaining the use of mathematical models and methods to analyze problems in computer science.
Oct 15, 2024 β’ 5 tweets β’ 2 min read
Agent S uses a computer like a human to solve diverse desktop tasks on different systems.
Experience-augmented hierarchical planning enables Agent S to handle diverse GUI tasks with improved performance.
**The original Problem** π―:
Automating complex computer tasks presents challenges in acquiring domain-specific knowledge, planning over long task horizons, and handling dynamic interfaces.
-----
**Solution in this Paper** π οΈ:
β’ Experience-augmented hierarchical planning:
- Manager module for task decomposition
- Worker modules for subtask execution
- Self-evaluator for experience summarization
β’ Agent-Computer Interface (ACI):
- Dual-input strategy for visual understanding and element grounding
- Bounded action space of language-based primitives
β’ Continual memory update mechanism for ongoing learning
-----
**Key Insights from this Paper** π‘:
β’ Combining external knowledge and internal experience enhances task planning
β’ Structured interface improves MLLM reasoning for GUI control
β’ Hierarchical planning supports long-horizon workflows
β’ Continual learning enables adaptation to new tasks and environments
-----
**Results** π:
β’ OSWorld benchmark: 20.58% success rate (83.6% relative improvement over baseline)
β’ Consistent improvements across five computer task categories
β’ WindowsAgentArena: 18.2% success rate (36.8% improvement without adaptation)
β’ Ablation studies confirm effectiveness of individual components
π€ Agent S addresses three main challenges in automating computer tasks:
1. Acquiring domain-specific knowledge for diverse applications 2. Planning over long task horizons 3. Handling dynamic, non-uniform interfaces
Oct 9, 2024 β’ 4 tweets β’ 3 min read
Brilliant Paper from @Microsoft. π
"DIFFERENTIAL TRANSFORMER" β¨
DIFF Transformer cancels attention noise, enhancing key information retrieval and reducing hallucination in large language models.
β’ 30% accuracy improvement in key information retrieval with 64K context
β’ 10-20% accuracy gain in many-shot in-context learning across datasets
β’ 7-11% reduction in hallucination for summarization and question answering
β’ Maintains performance with 6-bit quantization, while Transformer degrades significantly
**Original Problem** π:
Transformer tends to overallocate attention to irrelevant context, leading to challenges in accurately retrieving key information.
-----
**Solution in this Paper** π‘:
β’ Introduces DIFF Transformer with differential attention mechanism
β’ Calculates attention scores as difference between two separate softmax attention maps
β’ Subtraction cancels noise, promoting emergence of sparse attention patterns
β’ Amplifies attention to relevant context while reducing attention to irrelevant parts
β’ Uses GroupNorm to normalize each attention head independently
-----
**Key Insights from this Paper** π‘:
β’ DIFF Transformer outperforms Transformer in scaling model size and training tokens
β’ Requires only ~65% of model size or training tokens to match Transformer performance
β’ Excels in long-context modeling, key information retrieval, and in-context learning
β’ Mitigates hallucination in question answering and text summarization
β’ Reduces outliers in model activations, enabling better quantization
Transformer often over-attends to irrelevant context (i.e., attention noise). DIFF Transformer amplifies attention to answer spans and cancels noise, enhancing the capability of context modeling.