sampling-strategies

Community

Master token sampling in LLMs to control output quality and style.

Authorhung-phan
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides a deep dive into the intricacies of token sampling in autoregressive language models, helping users understand and utilize various sampling strategies to achieve desired output qualities like factual accuracy, creativity, or structured data generation.

Core Features & Use Cases

  • Sampling Fundamentals: Explains the fundamental concepts behind different sampling methods such as temperature, top-k/top-p, beam search, repetition penalties, and logprobs.
  • Sampling Strategies: Offers detailed guidance on implementing different sampling strategies like greedy, beam search, top-k, top-p, min-p, typical sampling, mirostat, repetition control, and structured generation.
  • Use Case: For instance, a developer could use this Skill to fine-tune the sampling settings for a language model to produce more factual and coherent responses, or a content creator could adjust settings to enhance creative writing.

Quick Start

Review the sampling strategies section in the skill to understand how to adjust temperature and top-p parameters to improve the output quality of your model.

Dependency Matrix

Required Modules

None required

Components

scriptsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: sampling-strategies
Download link: https://github.com/hung-phan/ml-skills/archive/main.zip#sampling-strategies

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 620,000+ vetted skills library on demand.