Best of Hugging Face — 2024

  1. 1
    Article
    Avatar of freecodecampfreeCodeCamp·2y

    Learn Generative AI for Developers

    Generative AI is transforming AI by enabling machines to produce text, images, and audio. A new 21-hour course on the freeCodeCamp.org YouTube channel offers a comprehensive guide for developers, covering foundational concepts, advanced methods, hands-on projects, and deployment. Key tools include Hugging Face, OpenAI, LangChain, and vector databases, with practical applications like chatbots and text summarizers. The course also delves into Retrieval-Augmented Generation (RAG) and deploying AI apps on Google Cloud and AWS.

  2. 2
    Article
    Avatar of kdnuggetsKDnuggets·2y

    A Simple to Implement End-to-End Project with HuggingFace

    Create an end-to-end project using a pre-trained Hugging Face model for sentiment analysis. This guide details how to deploy the model with FastAPI, build an API endpoint, and use Docker to containerize the application for easy deployment.

  3. 3
    Video
    Avatar of samwitteveenaiSam Witteveen·2y

    Ollama + HuggingFace - 45,000 New Models

    Ollama and Hugging Face have announced a collaboration allowing access to GGUF models on Hugging Face's hub, totaling around 45,000 models. Users can easily run these models using the Ollama run command, with options to choose different levels of model quantization (from 2-bit to 8-bit). The post provides guidance on selecting the appropriate quantization format based on performance and quality trade-offs. This new feature streamlines the process of deploying diverse models quickly and efficiently.

  4. 4
    Article
    Avatar of codemotionCodemotion·2y

    Practical Recipe for an AI-based Chatbot in the Browser

    Learn how to create a browser-based AI chatbot using JavaScript and Transformers.js without needing a server. This guide walks through setting up the interface, implementing web workers for efficient model execution, and connecting to models hosted on Huggingface. It covers everything from basic chat functionality to loading and running LLM models in real-time. Suggestions for improving responses, integrating larger models, and next steps for expanding your project are also provided.

  5. 5
    Video
    Avatar of samwitteveenaiSam Witteveen·2y

    Gemma 2 - Local RAG with Ollama and LangChain

    Gemma 2 has been released for multiple formats including Keras, PyTorch, and Hugging Face transformers. This post details the author's experience using the 9B and 27B models in Ollama, highlighting the better performance of the 9B model for real-time responses. A straightforward script is provided to create a fully local Retrieval-Augmented Generation (RAG) system using Gemma 2, Nomic embeddings, and ChromaDB, all executed within VSCode. The steps involve setting up an indexer, embedding transcripts from Alex Hormozi's YouTube channel, and handling text splitting methods. Debugging tips and additional add-ons for the RAG system are also discussed.

  6. 6
    Article
    Avatar of kdnuggetsKDnuggets·2y

    Building a Recommendation System with Hugging Face Transformers

    Learn to build a recommendation system using Hugging Face Transformers. This guide walks through the essential steps, from setting up the environment and processing the dataset to using embeddings and cosine similarity for accurate recommendations. It also highlights using the sentence-transformers package for transforming text into numerical vectors.

  7. 7
    Article
    Avatar of do_communityDigitalOcean Community·2y

    How to Train A Question-Answering Machine Learning Model (BERT)

    Question-Answering Models are designed to respond to questions using given context. This involves understanding language structure, semantic context, and pinpointing answer locations. The advent of Transformer's self-attention mechanism revolutionized NLP, leading to models like BERT. BERT's architecture includes a ladder of encoder layers that process data in parallel, making it efficient. Trained through Masked Language Modelling and Next Sentence Prediction, BERT is fine-tuned for specific tasks like question answering using datasets like SQuAD2.0. Here, BioBERT, a domain-specific variant, is trained using the Hugging Face library to answer COVID-19 related questions with modified data handling for RAM efficiency.

  8. 8
    Article
    Avatar of hnHacker News·2y

    huggingface/smollm: Everything about the SmolLM & SmolLM2 family of models

    SmolLM2 is a family of compact language models ranging from 135M to 1.7B parameters, designed for on-device use with versatile capabilities. The SmolLM2-1.7B-Instruct model can be used as an assistant via various tools and frameworks. Detailed instructions for pre-training, fine-tuning, and using these models are provided. Additionally, the newly introduced SmolTalk dataset aids in building these models.

  9. 9
    Article
    Avatar of gopenaiGoPenAI·2y

    Getting Started with Parler-TTS: Tips for Fine-Tuning and Inference 🎤🤗

    Parler-TTS introduced two new text-to-speech models: a lightweight Parler-TTS Mini v0.1 and a high-quality Parler-TTS Large v1. These models use natural language descriptions to control speech aspects like gender, background noise, and speaking rate. Key advancements include automatic labeling of large datasets and a decoder-only Transformer architecture. The models demonstrate significant improvements in generating high-fidelity speech. The post also provides a step-by-step guide for inference and fine-tuning on custom datasets.

  10. 10
    Article
    Avatar of mlnewsMachine Learning News·2y

    A Comparison of Top Embedding Libraries for Generative AI

    Text embeddings, which convert textual data into dense vector representations, are crucial for various AI tasks including text, image, and audio processing. This post compares 15 popular embedding libraries such as OpenAI, HuggingFace, Gensim, Facebook, and AllenNLP, highlighting their strengths and limitations. The choice of library depends on specific use cases, computational needs, and the extent of required customization.

  11. 11
    Article
    Avatar of communityCommunity Picks·2y

    BART Model for Text Summarization

    BART (Bidirectional and Auto-Regressive Transformers) is a pre-training method combining the strengths of BERT and GPT models. It's designed as a denoising autoencoder useful for various NLP tasks, especially text summarization. BART follows a sequence-to-sequence paradigm, excelling in both comprehension and fine-tuned text generation tasks. HuggingFace provides easy access to pre-trained BART models for text summarization.

  12. 12
    Article
    Avatar of medium_jsMedium·2y

    Fine-Tuning BERT for Text Classification

    Fine-tuning BERT for text classification involves adapting a pre-trained model to a specific use case with additional training. This method significantly reduces training costs and improves performance. The post walks through fine-tuning BERT to classify phishing URLs using the Hugging Face Transformers library, covering key tasks like tokenizing data, freezing model parameters, and setting up training. The provided Python code demonstrates the entire process, and the resulting model is computationally efficient enough to run on consumer hardware.

  13. 13
    Article
    Avatar of hnHacker News·2y

    qhjqhj00/MemoRAG: Empowering RAG with a memory-based data interface for all-purpose applications!

    MemoRAG is a cutting-edge RAG framework utilizing an advanced memory model to deliver more accurate and contextually rich responses by recalling query-specific clues from a global dataset. It supports long contexts (up to one million tokens), optimizes performance with minimal training, and implements efficient caching and context reusability. Active development is ongoing with various models and tools available in its repository.

  14. 14
    Article
    Avatar of aiAI·2y

    A new Embedding generation Library

    An open-source project offers a minimalistic embedding generation library written in Rust, utilizing HuggingFace's new candle framework. It supports generating embeddings from diverse sources like audio, PDF, markdown, and images.

  15. 15
    Article
    Avatar of gopenaiGoPenAI·2y

    Building the Mistral 7B Model from Scratch: A New Chapter for Algerian Darija 🇩🇿

    The post delves into building the Mistral 7B model from scratch to enhance its understanding and generation capabilities for Algerian Darija. It covers the process of designing the model architecture, addressing challenges with limited data, and the technical intricacies of pre-training. Key components discussed include Sliding Window Attention, Rolling Buffer Cache, Grouped-Query Attention, and Rotary Position Embedding. The post also explains constructing a dedicated tokenizer for Darija and provides a detailed guide for training the model, including implementation specifics and custom dataset handling.

  16. 16
    Article
    Avatar of gopenaiGoPenAI·2y

    Supervised fine tuning (SFT) of Microsoft Phi2 for Text2SQL Task (Part II)

    This article discusses the supervised fine-tuning of the Microsoft Phi2 model for the Text2SQL task. It covers data preparation, loading the dataset, preparing input, loading the pre-trained model, setting up a data collator, model training, model evaluation, and concludes with potential areas for improvement.