Almanac
← Events
4Hugging Face Blog·1mo ago

Guiding Text Generation with Constrained Beam Search in 🤗 Transformers

This Hugging Face blog post introduces constrained beam search, a text generation technique that allows users to enforce hard constraints on model outputs, such as requiring specific tokens or phrases to appear in generated text. The method extends standard beam search by guiding the search process to satisfy user-defined constraints while still optimizing for fluency. The post covers the implementation available in the Hugging Face Transformers library, making the technique accessible to practitioners.

Related guides (2)

Related events (8)

4Hugging Face Blog·1mo ago·source ↗

Generating Human-level Text with Contrastive Search in Transformers

Hugging Face introduces contrastive search, a decoding strategy for autoregressive language models that aims to produce more coherent and human-like text compared to standard methods like beam search or nucleus sampling. The technique works by balancing a model's confidence in its next-token prediction against a contrastive penalty that discourages repetitive or degenerate outputs. The blog post describes integration of contrastive search into the Hugging Face Transformers library, making it accessible to practitioners.

5Hugging Face Blog·1mo ago·source ↗

Assisted Generation: a new direction toward low-latency text generation

Hugging Face introduces assisted generation (speculative decoding) as a practical technique for reducing LLM inference latency. The approach uses a smaller draft model to propose token candidates that a larger model then verifies in parallel, enabling multiple tokens to be accepted per forward pass. The blog post explains the mechanism and demonstrates integration into the Hugging Face Transformers library.

3Hugging Face Blog·1mo ago·source ↗

Train and Fine-Tune Sentence Transformers Models

This Hugging Face blog post provides a technical guide on training and fine-tuning Sentence Transformers models for producing dense sentence embeddings. It covers dataset preparation, loss function selection, and training configuration using the sentence-transformers library. The post targets practitioners building semantic search, clustering, or similarity systems.

4Hugging Face Blog·1mo ago·source ↗

Training and Finetuning Embedding Models with Sentence Transformers

Hugging Face published a tutorial blog post on training and fine-tuning embedding models using the Sentence Transformers library. The post covers the workflow for customizing embedding models for downstream tasks such as semantic search and retrieval. As a tier-2 source with commentary depth, this serves as practical guidance for practitioners working with text embeddings.

5Hugging Face Blog·1mo ago·source ↗

Training and Finetuning Sparse Embedding Models with Sentence Transformers

Hugging Face published a tutorial on training and fine-tuning sparse embedding models using the Sentence Transformers library. Sparse embeddings offer an alternative to dense vector representations for retrieval tasks, potentially improving interpretability and efficiency. The post covers the tooling and workflows available in Sentence Transformers for producing sparse encoders suitable for search and RAG pipelines.

3Hugging Face Blog·1mo ago·source ↗

Optimizing Bark Text-to-Speech Using Hugging Face Transformers

This Hugging Face blog post details optimization techniques applied to Bark, a text-to-speech model, using the Transformers library. The post likely covers inference speed improvements, memory reduction strategies, and deployment considerations for the Bark model. As a tier-2 source focused on practical tooling, it provides implementation-level guidance for running Bark efficiently.

3Hugging Face Blog·1mo ago·source ↗

Pre-Train BERT with Hugging Face Transformers and Habana Gaudi

This Hugging Face blog post from August 2022 describes how to pre-train a BERT model from scratch using the Hugging Face Transformers library on Habana Gaudi hardware accelerators. It covers the full pipeline including data preparation, tokenizer training, and masked language modeling pretraining. The post serves as both a technical tutorial and a demonstration of Habana Gaudi's viability as an alternative AI training accelerator.

5Hugging Face Blog·1mo ago·source ↗

Zero-shot image-to-text generation with BLIP-2

Hugging Face published a blog post introducing BLIP-2, a multimodal model that enables zero-shot image-to-text generation by bridging frozen image encoders and large language models via a lightweight Querying Transformer (Q-Former). The post covers the model's architecture, capabilities, and how to use it via the Hugging Face Transformers library. BLIP-2 achieves strong performance on visual question answering and image captioning tasks without task-specific fine-tuning.