One-click install
npx skills add https://github.com/hung-phan/ml-skills --skill llm-hung-phan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llm
Source: https://github.com/hung-phan/ml-skills/tree/main/skills/ml-review/references/ml-architectures/llm
Command: npx skills add https://github.com/hung-phan/ml-skills --skill llm-hung-phan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires transformers, torch, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill addresses the challenges of designing, fine-tuning, and optimizing large language models (LLMs) for a wide range of natural language processing tasks, including text generation, understanding, summarization, translation, and more.

Core Features & Use Cases

  • LLM Architecture Design: Offers guidance on selecting the right architecture (GPT, BERT, T5) for specific tasks.
  • Modern Optimizations: Provides insights into advanced techniques like RoPE, GQA, SwiGLU, RMSNorm, and LoRA/QLoRA for improving model performance.
  • Tokenization: Discusses various tokenization methods (BPE, SentencePiece) and their applications.
  • KV-Cache: Explains the benefits and implementation of KV-cache for efficient attention computation.
  • Flash Attention: Describes the Flash Attention mechanism for optimizing attention calculations.
  • Fine-Tuning: Offers guidance on LoRA and QLoRA fine-tuning techniques.
  • RLHF/DPO Alignment: Covers the use of RLHF and DPO for aligning models with human preferences.
  • Inference Optimization: Discusses quantization, speculative decoding, and vLLM serving for efficient inference.
  • Model Selection Guide: Provides a decision tree for selecting the right model for various tasks.
  • Training Tips: Offers best practices for training LLMs, including learning rate, warmup, and gradient checkpointing.
  • Use Case: For a company developing a new NLP application, this Skill can help in choosing the right LLM architecture and fine-tuning it for the specific task.

Quick Start

Use the llm skill to design an LLM architecture for a text summarization task.

Frequently Asked Questions about llm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose the right large language model architecture for a specific NLP task?

Choosing the right large language model architecture involves selecting between GPT, BERT, and T5 based on your specific NLP task. A model selection decision tree helps match architectures to tasks like text generation or understanding.

What is the best way to fine-tune large language models efficiently?

The best way to fine-tune large language models efficiently is using LoRA and QLoRA techniques. These methods reduce computational overhead while adapting models to specific tasks, supported by the transformers and torch frameworks.

How does Flash Attention and KV-cache improve LLM inference optimization?

Flash Attention and KV-cache improve LLM inference optimization by streamlining attention calculations and storing key-value pairs. This reduces memory usage and accelerates text generation during model serving.

Can I use quantization and speculative decoding for faster large language model serving?

Yes, you can use quantization and speculative decoding for faster large language model serving. These inference optimization techniques, alongside vLLM serving, reduce memory footprints and accelerate token generation.

Do I need prior knowledge of NLP and tokenization to use this large language model skill?

Yes, you need prior knowledge of NLP and tokenization to use this large language model skill. It requires understanding tokenization methods like BPE and SentencePiece, alongside modern architectural optimizations like RoPE and RMSNorm.