[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DBXMZJT7EY1ZP3F7X2AP6B":3,"skill-same:01M6DBXMZJT7EY1ZP3F7X2AP6B":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":6,"ownerHtmlUrl":61,"ownerBlogUrl":6,"ownerDescription":62,"updatedAt":63,"install":64,"resources":77},"01M6DBXMZJT7EY1ZP3F7X2AP6B","outlines",null,"Outlines: structured JSON\u002Fregex\u002FPydantic LLM generation.","zapabob\u002FSkills","zapabob","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F130830376?v=4","01M6DBMYZAGRTFQDSQYW3W764P","峯岸 亮","01M6DBMZ3GKDSJ01NZ9XTZD7JD",2,"MIT","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Farchive\u002Fskill-md-reviewed\u002Fsha256\u002F06\u002F0621fb3388753cdbc90946a47342194ecc8408008a58f723aae0b4d11ca71aed\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"Outlines","Grammar-Based Generation","type","regex","local","schema","prompt","grammar","Safety","Type Safety","Transformers","macos","Local Models","Pydantic","vLLM","Structured Generation","json schema","windows","research","linux","2026-11-10 10:12:30",false,"---\nname: outlines\ndescription: \"Outlines: structured JSON\u002Fregex\u002FPydantic LLM generation.\"\nversion: 1.0.1\nauthor: Orchestra Research\nlicense: MIT\ndependencies: [outlines, transformers, vllm, pydantic]\nplatforms: [linux, macos, windows]\nmetadata:\n  hermes:\n    tags: [Prompt Engineering, Outlines, Structured Generation, JSON Schema, Pydantic, Local Models, Grammar-Based Generation, vLLM, Transformers, Type Safety]\n\n---\n\n# Outlines: Structured Text Generation\n\n## When to Use This Skill\n\nUse Outlines when you need to:\n- **Guarantee valid JSON\u002FXML\u002Fcode** structure during generation\n- **Use Pydantic models** for type-safe outputs\n- **Support local models** (Transformers, llama.cpp, vLLM)\n- **Maximize inference speed** with zero-overhead structured generation\n- **Generate against JSON schemas** automatically\n- **Control token sampling** at the grammar level\n\n**GitHub Stars**: 12,000+ | **From**: dottxt.ai (formerly .txt)\n\n> **API note (Outlines 1.x):** This skill targets the current v1 API.\n> The pre-1.0 helpers (`outlines.models.transformers(...)`,\n> `outlines.generate.json\u002Fchoice\u002Fregex\u002F...`) have been **removed**. In v1 you\n> create a model with `outlines.from_transformers(...)` (or `from_vllm`,\n> `from_llamacpp`, `from_openai`) and then **call the model directly** with an\n> output type: `model(prompt, output_type)`. JSON\u002FPydantic outputs are returned\n> as a **JSON string** — validate with `YourModel.model_validate_json(result)`.\n\n## Installation\n\n```bash\n# Base installation\npip install outlines\n\n# With specific backends\npip install outlines transformers  # Hugging Face models\npip install outlines llama-cpp-python  # llama.cpp\npip install outlines vllm  # vLLM for high-throughput\n```\n\n## Quick Start\n\n### Basic Example: Classification\n\n```python\nimport outlines\nfrom typing import Literal\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\nMODEL_NAME = \"microsoft\u002FPhi-3-mini-4k-instruct\"\n\n# v1: wrap a Transformers model + tokenizer\nmodel = outlines.from_transformers(\n    AutoModelForCausalLM.from_pretrained(MODEL_NAME, device_map=\"auto\"),\n    AutoTokenizer.from_pretrained(MODEL_NAME),\n)\n\n# Call the model directly with an output type\nprompt = \"Sentiment of 'This product is amazing!': \"\nsentiment = model(prompt, Literal[\"positive\", \"negative\", \"neutral\"])\n\nprint(sentiment)  # \"positive\" (guaranteed one of these)\n```\n\n### With Pydantic Models\n\n```python\nfrom pydantic import BaseModel\nimport outlines\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\nclass User(BaseModel):\n    name: str\n    age: int\n    email: str\n\nMODEL_NAME = \"microsoft\u002FPhi-3-mini-4k-instruct\"\nmodel = outlines.from_transformers(\n    AutoModelForCausalLM.from_pretrained(MODEL_NAME, device_map=\"auto\"),\n    AutoTokenizer.from_pretrained(MODEL_NAME),\n)\n\n# Generate structured output (returns a JSON string)\nprompt = \"Extract user: John Doe, 30 years old, john@example.com\"\nresult = model(prompt, User, max_new_tokens=200)\n\nuser = User.model_validate_json(result)  # parse into the Pydantic model\nprint(user.name)   # \"John Doe\"\nprint(user.age)    # 30\nprint(user.email)  # \"john@example.com\"\n```\n\n## Core Concepts\n\n### 1. Constrained Token Sampling\n\nOutlines constrains token generation at the logit level using a compiled\nautomaton derived from your output type.\n\n**How it works:**\n1. Convert the output type (JSON\u002FPydantic\u002Fregex\u002F`Literal`) to a schema\u002Fgrammar\n2. Compile the grammar into a token-level automaton\n3. Filter invalid tokens at each step during generation\n4. Fast-forward when only one valid token exists\n\n**Benefits:**\n- **Zero overhead**: Filtering happens at token level\n- **Speed improvement**: Fast-forward through deterministic paths\n- **Guaranteed validity**: Invalid outputs impossible\n\n```python\nimport outlines\nfrom pydantic import BaseModel\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\nclass Person(BaseModel):\n    name: str\n    age: int\n\nmodel = outlines.from_transformers(\n    AutoModelForCausalLM.from_pretrained(\"microsoft\u002FPhi-3-mini-4k-instruct\", device_map=\"auto\"),\n    AutoTokenizer.from_pretrained(\"microsoft\u002FPhi-3-mini-4k-instruct\"),\n)\n\nresult = model(\"Generate person: Alice, 25\", Person)\nperson = Person.model_validate_json(result)\n```\n\n### 2. Output Types\n\nIn v1 you pass the desired **output type** directly as the second argument.\n\n#### Multiple choice (`Literal`)\n\n```python\nfrom typing import Literal\n\nsentiment = model(\"Review: This is great!\", Literal[\"positive\", \"negative\", \"neutral\"])\n# Result: one of the three choices\n```\n\n#### JSON via Pydantic\n\n```python\nfrom pydantic import BaseModel\n\nclass Product(BaseModel):\n    name: str\n    price: float\n    in_stock: bool\n\nresult = model(\"Extract: iPhone 15, $999, available\", Product)\nproduct = Product.model_validate_json(result)  # valid Product instance\n```\n\n#### Regex (pass a regex string)\n\n```python\n# Generate text matching a regex pattern\nphone = model(\"Generate phone number:\", r\"[0-9]{3}-[0-9]{3}-[0-9]{4}\")\n# Result: \"555-123-4567\" (guaranteed to match the pattern)\n```\n\n#### Numeric types\n\n```python\n# Pass the Python type directly\nage = model(\"Person's age:\", int)      # guaranteed integer\nprice = model(\"Product price:\", float)  # guaranteed float\n```\n\n### 3. Model Backends\n\nOutlines supports multiple local and API-based backends via `from_*` factories.\n\n#### Transformers (Hugging Face)\n\n```python\nimport outlines\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\nmodel = outlines.from_transformers(\n    AutoModelForCausalLM.from_pretrained(\"microsoft\u002FPhi-3-mini-4k-instruct\", device_map=\"auto\"),\n    AutoTokenizer.from_pretrained(\"microsoft\u002FPhi-3-mini-4k-instruct\"),\n)\n\nresult = model(prompt, YourModel)\n```\n\n#### llama.cpp\n\n```python\nimport outlines\nfrom llama_cpp import Llama\n\nllm = Llama(\".\u002Fmodels\u002Fllama-3.1-8b-instruct.Q4_K_M.gguf\", n_gpu_layers=35, n_ctx=4096)\nmodel = outlines.from_llamacpp(llm)\n\nresult = model(prompt, YourModel)\n```\n\n#### vLLM (High Throughput)\n\n```python\nimport outlines\nfrom vllm import LLM\n\nllm = LLM(\"meta-llama\u002FLlama-3.1-8B-Instruct\", tensor_parallel_size=2)\nmodel = outlines.from_vllm(llm)\n\nresult = model(prompt, YourModel)\n```\n\n#### OpenAI (server-side constrained JSON)\n\n```python\nimport outlines\nfrom openai import OpenAI\n\nclient = OpenAI()\nmodel = outlines.from_openai(client, \"gpt-4o-mini\")\n\n# API backends support JSON-schema style structured output\nresult = model(prompt, YourModel)\n```\n\n### 4. Pydantic Integration\n\nOutlines has first-class Pydantic support with automatic schema translation.\nGeneration returns a JSON string; call `model_validate_json` to get an instance.\n\n#### Basic Models\n\n```python\nfrom pydantic import BaseModel, Field\n\nclass Article(BaseModel):\n    title: str = Field(description=\"Article title\")\n    author: str = Field(description=\"Author name\")\n    word_count: int = Field(description=\"Number of words\", gt=0)\n    tags: list[str] = Field(description=\"List of tags\")\n\nresult = model(\"Generate article about AI\", Article, max_new_tokens=300)\narticle = Article.model_validate_json(result)\nprint(article.title)\nprint(article.word_count)  # Guaranteed > 0\n```\n\n#### Nested Models\n\n```python\nclass Address(BaseModel):\n    street: str\n    city: str\n    country: str\n\nclass Person(BaseModel):\n    name: str\n    age: int\n    address: Address  # Nested model\n\nresult = model(\"Generate person in New York\", Person)\nperson = Person.model_validate_json(result)\nprint(person.address.city)  # \"New York\"\n```\n\n#### Enums and Literals\n\n```python\nfrom enum import Enum\nfrom typing import Literal\n\nclass Status(str, Enum):\n    PENDING = \"pending\"\n    APPROVED = \"approved\"\n    REJECTED = \"rejected\"\n\nclass Application(BaseModel):\n    applicant: str\n    status: Status  # Must be one of enum values\n    priority: Literal[\"low\", \"medium\", \"high\"]  # Must be one of literals\n\nresult = model(\"Generate application\", Application)\napp = Application.model_validate_json(result)\nprint(app.status)  # Status.PENDING (or APPROVED\u002FREJECTED)\n```\n\n## Common Patterns\n\n### Pattern 1: Data Extraction\n\n```python\nfrom pydantic import BaseModel\nimport outlines\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\nclass CompanyInfo(BaseModel):\n    name: str\n    founded_year: int\n    industry: str\n    employees: int\n\nmodel = outlines.from_transformers(\n    AutoModelForCausalLM.from_pretrained(\"microsoft\u002FPhi-3-mini-4k-instruct\", device_map=\"auto\"),\n    AutoTokenizer.from_pretrained(\"microsoft\u002FPhi-3-mini-4k-instruct\"),\n)\n\ntext = \"\"\"\nApple Inc. was founded in 1976 in the technology industry.\nThe company employs approximately 164,000 people worldwide.\n\"\"\"\n\nprompt = f\"Extract company information:\\n{text}\\n\\nCompany:\"\ncompany = CompanyInfo.model_validate_json(model(prompt, CompanyInfo, max_new_tokens=200))\n\nprint(f\"Name: {company.name}\")\nprint(f\"Founded: {company.founded_year}\")\nprint(f\"Industry: {company.industry}\")\nprint(f\"Employees: {company.employees}\")\n```\n\n### Pattern 2: Classification\n\n```python\nfrom typing import Literal\nfrom pydantic import BaseModel\n\n# Binary classification\nresult = model(\"Email: Buy now! 50% off!\", Literal[\"spam\", \"not_spam\"])\n\n# Multi-class classification\ncategory = model(\n    \"Article: Apple announces new iPhone...\",\n    Literal[\"technology\", \"business\", \"sports\", \"entertainment\"],\n)\n\n# With confidence\nclass Classification(BaseModel):\n    label: Literal[\"positive\", \"negative\", \"neutral\"]\n    confidence: float\n\nout = model(\"Review: This product is okay, nothing special\", Classification)\nresult = Classification.model_validate_json(out)\n```\n\n### Pattern 3: Structured Forms\n\n```python\nclass UserProfile(BaseModel):\n    full_name: str\n    age: int\n    email: str\n    phone: str\n    country: str\n    interests: list[str]\n\nprompt = \"\"\"\nExtract user profile from:\nName: Alice Johnson\nAge: 28\nEmail: alice@example.com\nPhone: 555-0123\nCountry: USA\nInterests: hiking, photography, cooking\n\"\"\"\n\nprofile = UserProfile.model_validate_json(model(prompt, UserProfile, max_new_tokens=250))\nprint(profile.full_name)\nprint(profile.interests)  # [\"hiking\", \"photography\", \"cooking\"]\n```\n\n### Pattern 4: Multi-Entity Extraction\n\n```python\nfrom typing import Literal\n\nclass Entity(BaseModel):\n    name: str\n    type: Literal[\"PERSON\", \"ORGANIZATION\", \"LOCATION\"]\n\nclass DocumentEntities(BaseModel):\n    entities: list[Entity]\n\ntext = \"Tim Cook met with Satya Nadella at Microsoft headquarters in Redmond.\"\nprompt = f\"Extract entities from: {text}\"\n\nresult = DocumentEntities.model_validate_json(model(prompt, DocumentEntities, max_new_tokens=300))\nfor entity in result.entities:\n    print(f\"{entity.name} ({entity.type})\")\n```\n\n### Pattern 5: Code Generation\n\n```python\nclass PythonFunction(BaseModel):\n    function_name: str\n    parameters: list[str]\n    docstring: str\n    body: str\n\nprompt = \"Generate a Python function to calculate factorial\"\nfunc = PythonFunction.model_validate_json(model(prompt, PythonFunction, max_new_tokens=300))\n\nprint(f\"def {func.function_name}({', '.join(func.parameters)}):\")\nprint(f'    \"\"\"{func.docstring}\"\"\"')\nprint(f\"    {func.body}\")\n```\n\n### Pattern 6: Batch Processing\n\n```python\nimport outlines\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n    age: int\n\nmodel = outlines.from_transformers(\n    AutoModelForCausalLM.from_pretrained(\"microsoft\u002FPhi-3-mini-4k-instruct\", device_map=\"auto\"),\n    AutoTokenizer.from_pretrained(\"microsoft\u002FPhi-3-mini-4k-instruct\"),\n)\n\ntexts = [\n    \"John is 30 years old\",\n    \"Alice is 25 years old\",\n    \"Bob is 40 years old\",\n]\n\n# v1 accepts a list of prompts for batched generation\nprompts = [f\"Extract from: {t}\" for t in texts]\noutputs = model(prompts, Person, max_new_tokens=100)\npeople = [Person.model_validate_json(o) for o in outputs]\nfor person in people:\n    print(f\"{person.name}: {person.age}\")\n```\n\n## Backend Configuration\n\n### Transformers\n\n```python\nimport outlines\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\nMODEL_NAME = \"microsoft\u002FPhi-3-mini-4k-instruct\"\n\n# Basic usage\nmodel = outlines.from_transformers(\n    AutoModelForCausalLM.from_pretrained(MODEL_NAME, device_map=\"auto\"),\n    AutoTokenizer.from_pretrained(MODEL_NAME),\n)\n\n# GPU + dtype configuration is set on the HF model itself\nimport torch\nmodel = outlines.from_transformers(\n    AutoModelForCausalLM.from_pretrained(MODEL_NAME, device_map=\"cuda\", torch_dtype=torch.float16),\n    AutoTokenizer.from_pretrained(MODEL_NAME),\n)\n\n# Popular models\nfor name in [\n    \"meta-llama\u002FLlama-3.1-8B-Instruct\",\n    \"mistralai\u002FMistral-7B-Instruct-v0.3\",\n    \"Qwen\u002FQwen2.5-7B-Instruct\",\n]:\n    model = outlines.from_transformers(\n        AutoModelForCausalLM.from_pretrained(name, device_map=\"auto\"),\n        AutoTokenizer.from_pretrained(name),\n    )\n```\n\n### llama.cpp\n\n```python\nimport outlines\nfrom llama_cpp import Llama\n\n# Load GGUF model\nllm = Llama(\n    \".\u002Fmodels\u002Fllama-3.1-8b.Q4_K_M.gguf\",\n    n_ctx=4096,       # Context window\n    n_gpu_layers=35,  # GPU layers\n    n_threads=8,      # CPU threads\n)\nmodel = outlines.from_llamacpp(llm)\n\n# Full GPU offload: set n_gpu_layers=-1 on the Llama object\n```\n\n### vLLM (Production)\n\n```python\nimport outlines\nfrom vllm import LLM\n\n# Single GPU\nmodel = outlines.from_vllm(LLM(\"meta-llama\u002FLlama-3.1-8B-Instruct\"))\n\n# Multi-GPU\nmodel = outlines.from_vllm(LLM(\"meta-llama\u002FLlama-3.1-70B-Instruct\", tensor_parallel_size=4))\n\n# With quantization\nmodel = outlines.from_vllm(LLM(\"meta-llama\u002FLlama-3.1-8B-Instruct\", quantization=\"awq\"))\n```\n\n## Best Practices\n\n### 1. Use Specific Types\n\n```python\n# ✅ Good: Specific types\nclass Product(BaseModel):\n    name: str\n    price: float  # Not str\n    quantity: int  # Not str\n    in_stock: bool  # Not str\n\n# ❌ Bad: Everything as string\nclass Product(BaseModel):\n    name: str\n    price: str  # Should be float\n    quantity: str  # Should be int\n```\n\n### 2. Add Constraints\n\n```python\nfrom pydantic import Field\n\n# ✅ Good: With constraints\nclass User(BaseModel):\n    name: str = Field(min_length=1, max_length=100)\n    age: int = Field(ge=0, le=120)\n    email: str = Field(pattern=r\"^[\\w\\.-]+@[\\w\\.-]+\\.\\w+$\")\n\n# ❌ Bad: No constraints\nclass User(BaseModel):\n    name: str\n    age: int\n    email: str\n```\n\n### 3. Use Enums for Categories\n\n```python\n# ✅ Good: Enum for fixed set\nclass Priority(str, Enum):\n    LOW = \"low\"\n    MEDIUM = \"medium\"\n    HIGH = \"high\"\n\nclass Task(BaseModel):\n    title: str\n    priority: Priority\n\n# ❌ Bad: Free-form string\nclass Task(BaseModel):\n    title: str\n    priority: str  # Can be anything\n```\n\n### 4. Provide Context in Prompts\n\n```python\n# ✅ Good: Clear context\nprompt = \"\"\"\nExtract product information from the following text.\nText: iPhone 15 Pro costs $999 and is currently in stock.\nProduct:\n\"\"\"\n\n# ❌ Bad: Minimal context\nprompt = \"iPhone 15 Pro costs $999 and is currently in stock.\"\n```\n\n### 5. Handle Optional Fields\n\n```python\nfrom typing import Optional\n\n# ✅ Good: Optional fields for incomplete data\nclass Article(BaseModel):\n    title: str  # Required\n    author: Optional[str] = None  # Optional\n    date: Optional[str] = None  # Optional\n    tags: list[str] = []  # Default empty list\n\n# Can succeed even if author\u002Fdate missing\n```\n\n### 6. Always Validate JSON Output\n\n```python\n# v1 returns a JSON string for Pydantic\u002FJSON output types.\nresult = model(prompt, Article)          # str\narticle = Article.model_validate_json(result)  # Article instance\n```\n\n## Comparison to Alternatives\n\n| Feature | Outlines | Instructor | Guidance | LMQL |\n|---------|----------|------------|----------|------|\n| Pydantic Support | ✅ Native | ✅ Native | ✅ Yes | ❌ No |\n| JSON Schema | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |\n| Regex Constraints | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes |\n| Local Models | ✅ Full | ⚠️ Limited | ✅ Full | ✅ Full |\n| API Models | ✅ Yes | ✅ Full | ✅ Yes | ✅ Full |\n| Zero Overhead | ✅ Yes | ❌ No | ⚠️ Partial | ✅ Yes |\n| Automatic Retrying | ❌ No | ✅ Yes | ❌ No | ❌ No |\n| Learning Curve | Low | Low | Low | High |\n\n**When to choose Outlines:**\n- Using local models (Transformers, llama.cpp, vLLM)\n- Need maximum inference speed\n- Want Pydantic model support\n- Require zero-overhead structured generation\n- Control token sampling process\n\n**When to choose alternatives:**\n- Instructor: Need API models with automatic retrying\n- Guidance: Need token healing and complex workflows\n- LMQL: Prefer declarative query syntax\n\n## Performance Characteristics\n\n**Speed:**\n- **Zero overhead**: Structured generation as fast as unconstrained\n- **Fast-forward optimization**: Skips deterministic tokens\n- **1.2-2x faster** than post-generation validation approaches\n\n**Memory:**\n- Automaton compiled once per output type (cached)\n- Minimal runtime overhead\n- Efficient with vLLM for high throughput\n\n**Accuracy:**\n- **100% valid outputs** (guaranteed by the constrained automaton)\n- No retry loops needed\n- Deterministic token filtering\n\n## Resources\n\n- **Documentation**: https:\u002F\u002Fdottxt-ai.github.io\u002Foutlines\u002F\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fdottxt-ai\u002Foutlines (12k+ stars)\n- **Discord**: https:\u002F\u002Fdiscord.gg\u002FR9DSu34mGd\n- **Blog**: https:\u002F\u002Fblog.dottxt.co\n\n## See Also\n\n- `references\u002Fjson_generation.md` - Comprehensive JSON and Pydantic patterns\n- `references\u002Fbackends.md` - Backend-specific configuration\n- `references\u002Fexamples.md` - Production-ready examples\n","# Outlines: Structured Text Generation\n\n## When to Use This Skill\n\nUse Outlines when you need to:\n- **Guarantee valid JSON\u002FXML\u002Fcode** structure during generation\n- **Use Pydantic models** for type-safe outputs\n- **Support local models** (Transformers, llama.cpp, vLLM)\n- **Maximize inference speed** with zero-overhead structured generation\n- **Generate against JSON schemas** automatically\n- **Control token sampling** at the grammar level\n\n**GitHub Stars**: 12,000+ | **From**: dottxt.ai (formerly .txt)\n\n> **API note (Outlines 1.x):** This skill targets the current v1 API.\n> The pre-1.0 helpers (`outlines.models.transformers(...)`,\n> `outlines.generate.json\u002Fchoice\u002Fregex\u002F...`) have been **removed**. In v1 you\n> create a model with `outlines.from_transformers(...)` (or `from_vllm`,\n> `from_llamacpp`, `from_openai`) and then **call the model directly** with an\n> output type: `model(prompt, output_type)`. JSON\u002FPydantic outputs are returned\n> as a **JSON string** — validate with `YourModel.model_validate_json(result)`.\n\n## Installation\n\n```bash\n# Base installation\npip install outlines\n\n# With specific backends\npip install outlines transformers  # Hugging Face models\npip install outlines llama-cpp-python  # llama.cpp\npip install outlines vllm  # vLLM for high-throughput\n```\n\n## Quick Start\n\n### Basic Example: Classification\n\n```python\nimport outlines\nfrom typing import Literal\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\nMODEL_NAME = \"microsoft\u002FPhi-3-mini-4k-instruct\"\n\n# v1: wrap a Transformers model + tokenizer\nmodel = outlines.from_transformers(\n    AutoModelForCausalLM.from_pretrained(MODEL_NAME, device_map=\"auto\"),\n    AutoTokenizer.from_pretrained(MODEL_NAME),\n)\n\n# Call the model directly with an output type\nprompt = \"Sentiment of 'This product is amazing!': \"\nsentiment = model(prompt, Literal[\"positive\", \"negative\", \"neutral\"])\n\nprint(sentiment)  # \"positive\" (guaranteed one of these)\n```\n\n### With Pydantic Models\n\n```python\nfrom pydantic import BaseModel\nimport outlines\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\nclass User(BaseModel):\n    name: str\n    age: int\n    email: str\n\nMODEL_NAME = \"microsoft\u002FPhi-3-mini-4k-instruct\"\nmodel = outlines.from_transformers(\n    AutoModelForCausalLM.from_pretrained(MODEL_NAME, device_map=\"auto\"),\n    AutoTokenizer.from_pretrained(MODEL_NAME),\n)\n\n# Generate structured output (returns a JSON string)\nprompt = \"Extract user: John Doe, 30 years old, john@example.com\"\nresult = model(prompt, User, max_new_tokens=200)\n\nuser = User.model_validate_json(result)  # parse into the Pydantic model\nprint(user.name)   # \"John Doe\"\nprint(user.age)    # 30\nprint(user.email)  # \"john@example.com\"\n```\n\n## Core Concepts\n\n### 1. Constrained Token Sampling\n\nOutlines constrains token generation at the logit level using a compiled\nautomaton derived from your output type.\n\n**How it works:**\n1. Convert the output type (JSON\u002FPydantic\u002Fregex\u002F`Literal`) to a schema\u002Fgrammar\n2. Compile the grammar into a token-level automaton\n3. Filter invalid tokens at each step during generation\n4. Fast-forward when only one valid token exists\n\n**Benefits:**\n- **Zero overhead**: Filtering happens at token level\n- **Speed improvement**: Fast-forward through deterministic paths\n- **Guaranteed validity**: Invalid outputs impossible\n\n```python\nimport outlines\nfrom pydantic import BaseModel\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\nclass Person(BaseModel):\n    name: str\n    age: int\n\nmodel = outlines.from_transformers(\n    AutoModelForCausalLM.from_pretrained(\"microsoft\u002FPhi-3-mini-4k-instruct\", device_map=\"auto\"),\n    AutoTokenizer.from_pretrained(\"microsoft\u002FPhi-3-mini-4k-instruct\"),\n)\n\nresult = model(\"Generate person: Alice, 25\", Person)\nperson = Person.model_validate_json(result)\n```\n\n### 2. Output Types\n\nIn v1 you pass the desired **output type** directly as the second argument.\n\n#### Multiple choice (`Literal`)\n\n```python\nfrom typing import Literal\n\nsentiment = model(\"Review: This is great!\", Literal[\"positive\", \"negative\", \"neutral\"])\n# Result: one of the three choices\n```\n\n#### JSON via Pydantic\n\n```python\nfrom pydantic import BaseModel\n\nclass Product(BaseModel):\n    name: str\n    price: float\n    in_stock: bool\n\nresult = model(\"Extract: iPhone 15, $999, available\", Product)\nproduct = Product.model_validate_json(result)  # valid Product instance\n```\n\n#### Regex (pass a regex string)\n\n```python\n# Generate text matching a regex pattern\nphone = model(\"Generate phone number:\", r\"[0-9]{3}-[0-9]{3}-[0-9]{4}\")\n# Result: \"555-123-4567\" (guaranteed to match the pattern)\n```\n\n#### Numeric types\n\n```python\n# Pass the Python type directly\nage = model(\"Person's age:\", int)      # guaranteed integer\nprice = model(\"Product price:\", float)  # guaranteed float\n```\n\n### 3. Model Backends\n\nOutlines supports multiple local and API-based backends via `from_*` factories.\n\n#### Transformers (Hugging Face)\n\n```python\nimport outlines\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\nmodel = outlines.from_transformers(\n    AutoModelForCausalLM.from_pretrained(\"microsoft\u002FPhi-3-mini-4k-instruct\", device_map=\"auto\"),\n    AutoTokenizer.from_pretrained(\"microsoft\u002FPhi-3-mini-4k-instruct\"),\n)\n\nresult = model(prompt, YourModel)\n```\n\n#### llama.cpp\n\n```python\nimport outlines\nfrom llama_cpp import Llama\n\nllm = Llama(\".\u002Fmodels\u002Fllama-3.1-8b-instruct.Q4_K_M.gguf\", n_gpu_layers=35, n_ctx=4096)\nmodel = outlines.from_llamacpp(llm)\n\nresult = model(prompt, YourModel)\n```\n\n#### vLLM (High Throughput)\n\n```python\nimport outlines\nfrom vllm import LLM\n\nllm = LLM(\"meta-llama\u002FLlama-3.1-8B-Instruct\", tensor_parallel_size=2)\nmodel = outlines.from_vllm(llm)\n\nresult = model(prompt, YourModel)\n```\n\n#### OpenAI (server-side constrained JSON)\n\n```python\nimport outlines\nfrom openai import OpenAI\n\nclient = OpenAI()\nmodel = outlines.from_openai(client, \"gpt-4o-mini\")\n\n# API backends support JSON-schema style structured output\nresult = model(prompt, YourModel)\n```\n\n### 4. Pydantic Integration\n\nOutlines has first-class Pydantic support with automatic schema translation.\nGeneration returns a JSON string; call `model_validate_json` to get an instance.\n\n#### Basic Models\n\n```python\nfrom pydantic import BaseModel, Field\n\nclass Article(BaseModel):\n    title: str = Field(description=\"Article title\")\n    author: str = Field(description=\"Author name\")\n    word_count: int = Field(description=\"Number of words\", gt=0)\n    tags: list[str] = Field(description=\"List of tags\")\n\nresult = model(\"Generate article about AI\", Article, max_new_tokens=300)\narticle = Article.model_validate_json(result)\nprint(article.title)\nprint(article.word_count)  # Guaranteed > 0\n```\n\n#### Nested Models\n\n```python\nclass Address(BaseModel):\n    street: str\n    city: str\n    country: str\n\nclass Person(BaseModel):\n    name: str\n    age: int\n    address: Address  # Nested model\n\nresult = model(\"Generate person in New York\", Person)\nperson = Person.model_validate_json(result)\nprint(person.address.city)  # \"New York\"\n```\n\n#### Enums and Literals\n\n```python\nfrom enum import Enum\nfrom typing import Literal\n\nclass Status(str, Enum):\n    PENDING = \"pending\"\n    APPROVED = \"approved\"\n    REJECTED = \"rejected\"\n\nclass Application(BaseModel):\n    applicant: str\n    status: Status  # Must be one of enum values\n    priority: Literal[\"low\", \"medium\", \"high\"]  # Must be one of literals\n\nresult = model(\"Generate application\", Application)\napp = Application.model_validate_json(result)\nprint(app.status)  # Status.PENDING (or APPROVED\u002FREJECTED)\n```\n\n## Common Patterns\n\n### Pattern 1: Data Extraction\n\n```python\nfrom pydantic import BaseModel\nimport outlines\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\nclass CompanyInfo(BaseModel):\n    name: str\n    founded_year: int\n    industry: str\n    employees: int\n\nmodel = outlines.from_transformers(\n    AutoModelForCausalLM.from_pretrained(\"microsoft\u002FPhi-3-mini-4k-instruct\", device_map=\"auto\"),\n    AutoTokenizer.from_pretrained(\"microsoft\u002FPhi-3-mini-4k-instruct\"),\n)\n\ntext = \"\"\"\nApple Inc. was founded in 1976 in the technology industry.\nThe company employs approximately 164,000 people worldwide.\n\"\"\"\n\nprompt = f\"Extract company information:\\n{text}\\n\\nCompany:\"\ncompany = CompanyInfo.model_validate_json(model(prompt, CompanyInfo, max_new_tokens=200))\n\nprint(f\"Name: {company.name}\")\nprint(f\"Founded: {company.founded_year}\")\nprint(f\"Industry: {company.industry}\")\nprint(f\"Employees: {company.employees}\")\n```\n\n### Pattern 2: Classification\n\n```python\nfrom typing import Literal\nfrom pydantic import BaseModel\n\n# Binary classification\nresult = model(\"Email: Buy now! 50% off!\", Literal[\"spam\", \"not_spam\"])\n\n# Multi-class classification\ncategory = model(\n    \"Article: Apple announces new iPhone...\",\n    Literal[\"technology\", \"business\", \"sports\", \"entertainment\"],\n)\n\n# With confidence\nclass Classification(BaseModel):\n    label: Literal[\"positive\", \"negative\", \"neutral\"]\n    confidence: float\n\nout = model(\"Review: This product is okay, nothing special\", Classification)\nresult = Classification.model_validate_json(out)\n```\n\n### Pattern 3: Structured Forms\n\n```python\nclass UserProfile(BaseModel):\n    full_name: str\n    age: int\n    email: str\n    phone: str\n    country: str\n    interests: list[str]\n\nprompt = \"\"\"\nExtract user profile from:\nName: Alice Johnson\nAge: 28\nEmail: alice@example.com\nPhone: 555-0123\nCountry: USA\nInterests: hiking, photography, cooking\n\"\"\"\n\nprofile = UserProfile.model_validate_json(model(prompt, UserProfile, max_new_tokens=250))\nprint(profile.full_name)\nprint(profile.interests)  # [\"hiking\", \"photography\", \"cooking\"]\n```\n\n### Pattern 4: Multi-Entity Extraction\n\n```python\nfrom typing import Literal\n\nclass Entity(BaseModel):\n    name: str\n    type: Literal[\"PERSON\", \"ORGANIZATION\", \"LOCATION\"]\n\nclass DocumentEntities(BaseModel):\n    entities: list[Entity]\n\ntext = \"Tim Cook met with Satya Nadella at Microsoft headquarters in Redmond.\"\nprompt = f\"Extract entities from: {text}\"\n\nresult = DocumentEntities.model_validate_json(model(prompt, DocumentEntities, max_new_tokens=300))\nfor entity in result.entities:\n    print(f\"{entity.name} ({entity.type})\")\n```\n\n### Pattern 5: Code Generation\n\n```python\nclass PythonFunction(BaseModel):\n    function_name: str\n    parameters: list[str]\n    docstring: str\n    body: str\n\nprompt = \"Generate a Python function to calculate factorial\"\nfunc = PythonFunction.model_validate_json(model(prompt, PythonFunction, max_new_tokens=300))\n\nprint(f\"def {func.function_name}({', '.join(func.parameters)}):\")\nprint(f'    \"\"\"{func.docstring}\"\"\"')\nprint(f\"    {func.body}\")\n```\n\n### Pattern 6: Batch Processing\n\n```python\nimport outlines\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\nfrom pydantic import BaseModel\n\nclass Person(BaseModel):\n    name: str\n    age: int\n\nmodel = outlines.from_transformers(\n    AutoModelForCausalLM.from_pretrained(\"microsoft\u002FPhi-3-mini-4k-instruct\", device_map=\"auto\"),\n    AutoTokenizer.from_pretrained(\"microsoft\u002FPhi-3-mini-4k-instruct\"),\n)\n\ntexts = [\n    \"John is 30 years old\",\n    \"Alice is 25 years old\",\n    \"Bob is 40 years old\",\n]\n\n# v1 accepts a list of prompts for batched generation\nprompts = [f\"Extract from: {t}\" for t in texts]\noutputs = model(prompts, Person, max_new_tokens=100)\npeople = [Person.model_validate_json(o) for o in outputs]\nfor person in people:\n    print(f\"{person.name}: {person.age}\")\n```\n\n## Backend Configuration\n\n### Transformers\n\n```python\nimport outlines\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\n\nMODEL_NAME = \"microsoft\u002FPhi-3-mini-4k-instruct\"\n\n# Basic usage\nmodel = outlines.from_transformers(\n    AutoModelForCausalLM.from_pretrained(MODEL_NAME, device_map=\"auto\"),\n    AutoTokenizer.from_pretrained(MODEL_NAME),\n)\n\n# GPU + dtype configuration is set on the HF model itself\nimport torch\nmodel = outlines.from_transformers(\n    AutoModelForCausalLM.from_pretrained(MODEL_NAME, device_map=\"cuda\", torch_dtype=torch.float16),\n    AutoTokenizer.from_pretrained(MODEL_NAME),\n)\n\n# Popular models\nfor name in [\n    \"meta-llama\u002FLlama-3.1-8B-Instruct\",\n    \"mistralai\u002FMistral-7B-Instruct-v0.3\",\n    \"Qwen\u002FQwen2.5-7B-Instruct\",\n]:\n    model = outlines.from_transformers(\n        AutoModelForCausalLM.from_pretrained(name, device_map=\"auto\"),\n        AutoTokenizer.from_pretrained(name),\n    )\n```\n\n### llama.cpp\n\n```python\nimport outlines\nfrom llama_cpp import Llama\n\n# Load GGUF model\nllm = Llama(\n    \".\u002Fmodels\u002Fllama-3.1-8b.Q4_K_M.gguf\",\n    n_ctx=4096,       # Context window\n    n_gpu_layers=35,  # GPU layers\n    n_threads=8,      # CPU threads\n)\nmodel = outlines.from_llamacpp(llm)\n\n# Full GPU offload: set n_gpu_layers=-1 on the Llama object\n```\n\n### vLLM (Production)\n\n```python\nimport outlines\nfrom vllm import LLM\n\n# Single GPU\nmodel = outlines.from_vllm(LLM(\"meta-llama\u002FLlama-3.1-8B-Instruct\"))\n\n# Multi-GPU\nmodel = outlines.from_vllm(LLM(\"meta-llama\u002FLlama-3.1-70B-Instruct\", tensor_parallel_size=4))\n\n# With quantization\nmodel = outlines.from_vllm(LLM(\"meta-llama\u002FLlama-3.1-8B-Instruct\", quantization=\"awq\"))\n```\n\n## Best Practices\n\n### 1. Use Specific Types\n\n```python\n# ✅ Good: Specific types\nclass Product(BaseModel):\n    name: str\n    price: float  # Not str\n    quantity: int  # Not str\n    in_stock: bool  # Not str\n\n# ❌ Bad: Everything as string\nclass Product(BaseModel):\n    name: str\n    price: str  # Should be float\n    quantity: str  # Should be int\n```\n\n### 2. Add Constraints\n\n```python\nfrom pydantic import Field\n\n# ✅ Good: With constraints\nclass User(BaseModel):\n    name: str = Field(min_length=1, max_length=100)\n    age: int = Field(ge=0, le=120)\n    email: str = Field(pattern=r\"^[\\w\\.-]+@[\\w\\.-]+\\.\\w+$\")\n\n# ❌ Bad: No constraints\nclass User(BaseModel):\n    name: str\n    age: int\n    email: str\n```\n\n### 3. Use Enums for Categories\n\n```python\n# ✅ Good: Enum for fixed set\nclass Priority(str, Enum):\n    LOW = \"low\"\n    MEDIUM = \"medium\"\n    HIGH = \"high\"\n\nclass Task(BaseModel):\n    title: str\n    priority: Priority\n\n# ❌ Bad: Free-form string\nclass Task(BaseModel):\n    title: str\n    priority: str  # Can be anything\n```\n\n### 4. Provide Context in Prompts\n\n```python\n# ✅ Good: Clear context\nprompt = \"\"\"\nExtract product information from the following text.\nText: iPhone 15 Pro costs $999 and is currently in stock.\nProduct:\n\"\"\"\n\n# ❌ Bad: Minimal context\nprompt = \"iPhone 15 Pro costs $999 and is currently in stock.\"\n```\n\n### 5. Handle Optional Fields\n\n```python\nfrom typing import Optional\n\n# ✅ Good: Optional fields for incomplete data\nclass Article(BaseModel):\n    title: str  # Required\n    author: Optional[str] = None  # Optional\n    date: Optional[str] = None  # Optional\n    tags: list[str] = []  # Default empty list\n\n# Can succeed even if author\u002Fdate missing\n```\n\n### 6. Always Validate JSON Output\n\n```python\n# v1 returns a JSON string for Pydantic\u002FJSON output types.\nresult = model(prompt, Article)          # str\narticle = Article.model_validate_json(result)  # Article instance\n```\n\n## Comparison to Alternatives\n\n| Feature | Outlines | Instructor | Guidance | LMQL |\n|---------|----------|------------|----------|------|\n| Pydantic Support | ✅ Native | ✅ Native | ✅ Yes | ❌ No |\n| JSON Schema | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |\n| Regex Constraints | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes |\n| Local Models | ✅ Full | ⚠️ Limited | ✅ Full | ✅ Full |\n| API Models | ✅ Yes | ✅ Full | ✅ Yes | ✅ Full |\n| Zero Overhead | ✅ Yes | ❌ No | ⚠️ Partial | ✅ Yes |\n| Automatic Retrying | ❌ No | ✅ Yes | ❌ No | ❌ No |\n| Learning Curve | Low | Low | Low | High |\n\n**When to choose Outlines:**\n- Using local models (Transformers, llama.cpp, vLLM)\n- Need maximum inference speed\n- Want Pydantic model support\n- Require zero-overhead structured generation\n- Control token sampling process\n\n**When to choose alternatives:**\n- Instructor: Need API models with automatic retrying\n- Guidance: Need token healing and complex workflows\n- LMQL: Prefer declarative query syntax\n\n## Performance Characteristics\n\n**Speed:**\n- **Zero overhead**: Structured generation as fast as unconstrained\n- **Fast-forward optimization**: Skips deterministic tokens\n- **1.2-2x faster** than post-generation validation approaches\n\n**Memory:**\n- Automaton compiled once per output type (cached)\n- Minimal runtime overhead\n- Efficient with vLLM for high throughput\n\n**Accuracy:**\n- **100% valid outputs** (guaranteed by the constrained automaton)\n- No retry loops needed\n- Deterministic token filtering\n\n## Resources\n\n- **Documentation**: https:\u002F\u002Fdottxt-ai.github.io\u002Foutlines\u002F\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fdottxt-ai\u002Foutlines (12k+ stars)\n- **Discord**: https:\u002F\u002Fdiscord.gg\u002FR9DSu34mGd\n- **Blog**: https:\u002F\u002Fblog.dottxt.co\n\n## See Also\n\n- `references\u002Fjson_generation.md` - Comprehensive JSON and Pydantic patterns\n- `references\u002Fbackends.md` - Backend-specific configuration\n- `references\u002Fexamples.md` - Production-ready examples\n",{"name":5,"author":44,"license":15,"version":45,"metadata":46,"platforms":51,"description":7,"dependencies":52},"Orchestra Research","1.0.1",{"hermes":47},{"tags":48},[49,19,34,50,32,31,20,33,29,28],"Prompt Engineering","JSON Schema",[38,30,36],[5,53,54,55],"transformers","vllm","pydantic","main","0d1434f89f4bc6b07e9d272accd8c1013768820f","archive\u002Fskill-md-reviewed\u002Fsha256\u002F06\u002F0621fb3388753cdbc90946a47342194ecc8408008a58f723aae0b4d11ca71aed",0,"https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills","https:\u002F\u002Fgithub.com\u002Fzapabob","The Open University of JAPAN　2019-now\r\n\r\nTokyo University of Science　2007-2010","2026-10-26 16:29:01",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add zapabob\u002FSkills --skill outlines",{"tool":70,"command":71},"bunx","bunx skills add zapabob\u002FSkills --skill outlines",{"tool":73,"command":74},"pnpm","pnpm dlx skills add zapabob\u002FSkills --skill outlines","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Farchive\u002Fskill-md-reviewed\u002Fsha256\u002F06\u002F0621fb3388753cdbc90946a47342194ecc8408008a58f723aae0b4d11ca71aed\u002FSKILL.md",true,[],[79,114,149,175,202,219],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":98,"publishedAt":39},"01M6GJTE1GESGGF9K028Y7753E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fxurl\u002Fvariants\u002Fhermes-agent\u002FSKILL.md",[85,90,93],{"categoryNo":86,"categoryName":87,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":91,"categoryName":92,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":94,"categoryName":95,"taxonomyType":96,"taxonomyTypeDesc":97},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[81,99,30,100,101,38,36,102,103,104,105,106,107,108,109,110,56,111,112,113],"openclaw","cli","github","official","search","https","social-media","api","Media","hermes","hermes agent","twitter","social","via","post",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":131,"publishedAt":39},"01M6GJT8S1PXQ8WPXT1HSNBWH2","writing-plans","Write implementation plans: bite-sized tasks, paths, code.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fwriting-plans\u002Fvariants\u002Fhermes-agent\u002FSKILL.md",[120,123,126,127,128],{"categoryNo":121,"categoryName":122,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":124,"categoryName":125,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":91,"categoryName":92,"taxonomyType":88,"taxonomyTypeDesc":89},{"categoryNo":94,"categoryName":95,"taxonomyType":96,"taxonomyTypeDesc":97},{"categoryNo":129,"categoryName":130,"taxonomyType":96,"taxonomyTypeDesc":97},"01JBSEEDCAT000000000000036","内容创作者",[132,133,134,135,30,136,38,137,36,138,139,140,141,142,143,144,145,146,147,148],"writing","writing plans","plans","design","review","workflow","documentation","tasks","development","code","planning","code-review","subagent","write","superpowers","paths","test-driven-development",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":158,"publishedAt":39},"01M6GJST0H5X7WHBJ3BZK0DVKH","whisper","OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fwhisper\u002Fvariants\u002Fhermes-agent-optional\u002FSKILL.md",[155],{"categoryNo":156,"categoryName":157,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000016","图像与多媒体",[151,30,38,159,160,161,29,162,163,164,165,166,167,168,169,170,171,172,173,174],"openai","speech","multimodal","ASR","Audio","text","model","speech recognition","use","general","multilingual","translation","english","identification","processing","Audio Processing",{"skillNo":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":184,"publishedAt":39},"01M6GJSMRQ8EETZTYMG72P70EA","weights-and-biases","W&B: log ML experiments, sweeps, model registry, dashboards.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fweights-and-biases\u002Fvariants\u002Fhermes-agent\u002FSKILL.md",[181],{"categoryNo":182,"categoryName":183,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000013","分析与可视化",[185,30,186,187,36,188,189,190,191,192,193,165,194,195,196,197,198,199,200,201],"weights and biases","tensorflow","experiments","pytorch","visualization","registry","real-time","tuning","dashboards","experiment","log","time","Experiment Tracking","Model Registry","Hyperparameter Tuning","WandB","Real-Time Visualization",{"skillNo":203,"name":204,"nameZh":6,"description":205,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":206,"categories":207,"keywords":209,"publishedAt":39},"01M6GJS19KDPRY112JTR326S06","watchers","Poll RSS, JSON APIs, and GitHub with watermark dedup.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fwatchers\u002Fvariants\u002Fhermes-agent-optional\u002FSKILL.md",[208],{"categoryNo":91,"categoryName":92,"taxonomyType":88,"taxonomyTypeDesc":89},[204,30,210,101,38,211,212,213,214,215,216,108,109,217,218],"terminal","automation","http","monitoring","cron","json","rss","devops","with",{"skillNo":220,"name":221,"nameZh":6,"description":222,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":223,"categories":224,"keywords":227,"publishedAt":39},"01M6GJRHJD2A6Q830SWF9W48BC","serving-llms-vllm","vLLM: high-throughput LLM serving, OpenAI API, quantization.","https:\u002F\u002Fgithub.com\u002Fzapabob\u002FSkills\u002Fblob\u002Fmain\u002Fregistry\u002Fskills\u002Fvllm\u002Fvariants\u002Fhermes-agent\u002FSKILL.md",[225,226],{"categoryNo":86,"categoryName":87,"taxonomyType":88,"taxonomyTypeDesc":89},{"categoryNo":94,"categoryName":95,"taxonomyType":96,"taxonomyTypeDesc":97},[228,33,229,38,37,159,230,231,232,29,233,106,234,235,236,237,238,239,240,241],"llms","serving llms vllm","openai api","tensor","Inference Serving","Production","llm serving","High Throughput","PagedAttention","Continuous Batching","Quantization","Tensor Parallelism","high-throughput","throughput"]