{
  "source_file": "0930",
  "source_platform": "个人博客",
  "author": "Jay Alammar",
  "title_listed": "Applying massive language models in the real world with Cohere",
  "keywords": "大语言模型,应用,Cohere",
  "domain": "大模型算法",
  "content_type": "图解教程",
  "is_paid_flag": "否",
  "url": "https://jalammar.github.io/applying-large-language-models-cohere/",
  "publish_date": "2022-03",
  "corpus_stage": "推理部署",
  "notes": "大语言模型实战应用（Cohere）",
  "id": "390599b6c2de",
  "collected_at": "2026-10-02T14:25:34",
  "title": "Applying massive language models in the real world with Cohere – Jay Alammar – Visualizing machine learning one concept at a time.",
  "body_markdown": "Applying massive language models in the real world with Cohere\nA little less than a year ago, I joined the awesome\nCohere\nteam. The company trains massive language models (both GPT-like and BERT-like) and offers them as an API (which also supports finetuning). Its founders include Google Brain alums including co-authors of the original Transformers paper. It’s a fascinating role where I get to help companies and developers put these massive models to work solving real-world problems.\nI love that I get to share some of the intuitions developers need to start problem-solving with these models. Even though I’ve been working very closely on pretrained Transformers for the past several years (for this blog and in developing\nEcco\n), I’m enjoying the convenience of problem-solving with managed language models as it frees up the restrictions of model loading/deployment and memory/GPU management.\nThese are some of the articles I wrote and collaborated on with colleagues over the last few months:\nIntro to Large Language Models with Cohere\nThis is a high-level intro to large language models to people who are new to them. It establishes the difference between generative (GPT-like) and representation (BERT-like) models and examples use cases for them.\nThis is one of the first articles I got to write. It's extracted from a much larger document that I wrote to explore some of the visual language to use in explaining the application of these models.\nA visual guide to prompt engineering\nMassive GPT models open the door for a new way of programming. If you structure the input text in the right way, you can useful (and often fascinating) results for a lot of taasks (e.g. text classification, copy writing, summarization...etc).\nThis article visually demonstrates four principals to create prompts effectively.\nText Summarization\nThis is a walkthrough of creating a simple summarization system. It links to a jupyter notebook which includes the code to start experimenting with text generation and summarization.\nThe end of this notebook shows an important idea I want to spend more time on in the future. That of how to rank/filter/select the best from amongst multiple generations.\nSemantic Search\nSemantic search has to be one of the most exciting applications of sentence embedding models. This tutorials implements a \"similar questions\" functionality using sentence embeddings and a a vector search library.\nThe vector search library used here is\nAnnoy\nfrom Spotify. There are a bunch of others out there.\nFaiss\nis used widely. I experiment with\nPyNNDescent\nas well.\nFinetuning Representation Models\nFinetuning tends to lead to the best results language models can achieve. This article explains the intuitions around finetuning representation/sentence embedding models. I've added a couple more visuals to the\nTwitter thread\n.\nThe research around this area is very interesting. I've highly enjoyed papers like\nSentence BERT\nand\nApproximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval\nControlling Generation with top-k & top-p\nThis one is a little bit more technical. It explains the parameters you tweak to adjust a GPT's\ndecoding strategy\n-- the method with which the system picks output tokens.\nText Classification Using Embeddings\nThis is a walkthrough of one of the most common use cases of embedding models -- text classification. It is similar to\nA Visual Guide to Using BERT for the First Time\n, but uses Cohere's API.\nYou can find these and upcoming articles in the\nCohere docs\nand\nnotebooks repo\n. I have quite number of experiments and interesting workflows I’d love to be sharing in the coming weeks. So stay tuned!\nWritten on March  7, 2022",
  "metadata": {
    "title": "Applying massive language models in the real world with Cohere – Jay Alammar – Visualizing machine learning one concept at a time.",
    "description": "A little less than a year ago, I joined the awesome Cohere team. The company trains massive language models (both GPT-like and BERT-like) and offers them as an API (which also supports finetuning). Its founders include Google Brain alums including co-authors of the original Transformers paper. It’s a fascinating role where I get to help companies and developers put these massive models to work solving real-world problems.\n\nI love that I get to share some of the intuitions developers need to start problem-solving with these models. Even though I’ve been working very closely on pretrained Transformers for the past several years (for this blog and in developing Ecco), I’m enjoying the convenience of problem-solving with managed language models as it frees up the restrictions of model loading/deployment and memory/GPU management.\n\nThese are some of the articles I wrote and collaborated on with colleagues over the last few months:\n\nIntro to Large Language Models with Cohere\n\n    \n  \n    \n    \n    This is a high-level intro to large language models to people who are new to them. It establishes the difference between generative (GPT-like) and representation (BERT-like) models and examples use cases for them.\n    This is one of the first articles I got to write. It's extracted from a much larger document that I wrote to explore some of the visual language to use in explaining the application of these models.\n    \n\n\nA visual guide to prompt engineering \n\n\n    \n  \n    \n    \n        Massive GPT models open the door for a new way of programming. If you structure the input text in the right way, you can useful (and often fascinating) results for a lot of taasks (e.g. text classification, copy writing, summarization...etc).\n        \n        This article visually demonstrates four principals to create prompts effectively. \n    \n\n\n Text Summarization\n\n\n    \n  \n    \n    \n    This is a walkthrough of creating a simple summarization system. It links to a jupyter notebook which includes the code to start experimenting with text generation and summarization.\n    The end of this notebook shows an important idea I want to spend more time on in the future. That of how to rank/filter/select the best from amongst multiple generations.\n    \n\n\nSemantic Search\n\n\n    \n  \n    \n    \n    Semantic search has to be one of the most exciting applications of sentence embedding models. This tutorials implements a",
    "keywords": null,
    "author": "Jay Alammar",
    "og:description": "A little less than a year ago, I joined the awesome Cohere team. The company trains massive language models (both GPT-like and BERT-like) and offers them as an API (which also supports finetuning). Its founders include Google Brain alums including co-authors of the original Transformers paper. It’s a fascinating role where I get to help companies and developers put these massive models to work solving real-world problems.\n\nI love that I get to share some of the intuitions developers need to start problem-solving with these models. Even though I’ve been working very closely on pretrained Transformers for the past several years (for this blog and in developing Ecco), I’m enjoying the convenience of problem-solving with managed language models as it frees up the restrictions of model loading/deployment and memory/GPU management.\n\nThese are some of the articles I wrote and collaborated on with colleagues over the last few months:\n\nIntro to Large Language Models with Cohere\n\n    \n  \n    \n    \n    This is a high-level intro to large language models to people who are new to them. It establishes the difference between generative (GPT-like) and representation (BERT-like) models and examples use cases for them.\n    This is one of the first articles I got to write. It's extracted from a much larger document that I wrote to explore some of the visual language to use in explaining the application of these models.\n    \n\n\nA visual guide to prompt engineering \n\n\n    \n  \n    \n    \n        Massive GPT models open the door for a new way of programming. If you structure the input text in the right way, you can useful (and often fascinating) results for a lot of taasks (e.g. text classification, copy writing, summarization...etc).\n        \n        This article visually demonstrates four principals to create prompts effectively. \n    \n\n\n Text Summarization\n\n\n    \n  \n    \n    \n    This is a walkthrough of creating a simple summarization system. It links to a jupyter notebook which includes the code to start experimenting with text generation and summarization.\n    The end of this notebook shows an important idea I want to spend more time on in the future. That of how to rank/filter/select the best from amongst multiple generations.\n    \n\n\nSemantic Search\n\n\n    \n  \n    \n    \n    Semantic search has to be one of the most exciting applications of sentence embedding models. This tutorials implements a",
    "og:title": "Applying massive language models in the real world with Cohere"
  },
  "paywall": {
    "listed_paid": false,
    "detected": false,
    "marker": "",
    "public_only": false,
    "policy": "付费/会员内容只保留页面公开可见部分，不绕过付费墙"
  },
  "crawl": {
    "success": true,
    "status_code": 200,
    "error": ""
  },
  "code_blocks": [],
  "images": [
    {
      "status": "ok",
      "url": "https://files.readme.io/0a9715d-IntroToLLM_Visual_1.svg",
      "bytes": 21233,
      "reused": true,
      "local_path": "attachments/390599b6c2de/images/000.svg",
      "src": "https://files.readme.io/0a9715d-IntroToLLM_Visual_1.svg",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://files.readme.io/db285b8-PromptEngineering_Visual_2.svg",
      "bytes": 14904,
      "reused": true,
      "local_path": "attachments/390599b6c2de/images/001.svg",
      "src": "https://files.readme.io/db285b8-PromptEngineering_Visual_2.svg",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://files.readme.io/296454c-TextSummarization_Visual_1.svg",
      "bytes": 15154,
      "reused": true,
      "local_path": "attachments/390599b6c2de/images/002.svg",
      "src": "https://files.readme.io/296454c-TextSummarization_Visual_1.svg",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://files.readme.io/4ec00e1-SemanticSearch_Visual_1.svg",
      "bytes": 25098,
      "reused": true,
      "local_path": "attachments/390599b6c2de/images/003.svg",
      "src": "https://files.readme.io/4ec00e1-SemanticSearch_Visual_1.svg",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://files.readme.io/699aead-TrainingRepModels_Visual_4.svg",
      "bytes": 32996,
      "reused": false,
      "local_path": "attachments/390599b6c2de/images/body-23e9df0a0d67845cd7d9.svg",
      "src": "https://files.readme.io/699aead-TrainingRepModels_Visual_4.svg",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://files.readme.io/ab291f6-Top-KTop-P_Visual_4.svg",
      "bytes": 41301,
      "reused": false,
      "local_path": "attachments/390599b6c2de/images/body-53c31bb048319e689808.svg",
      "src": "https://files.readme.io/ab291f6-Top-KTop-P_Visual_4.svg",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://files.readme.io/ee56264-Controlling_Generation_with_Top-K__Top-P_Visual_1.svg",
      "bytes": 41176,
      "reused": false,
      "local_path": "attachments/390599b6c2de/images/body-92fd4f5408582b7af059.svg",
      "src": "https://files.readme.io/ee56264-Controlling_Generation_with_Top-K__Top-P_Visual_1.svg",
      "alt": "",
      "downloaded": true
    }
  ],
  "audio": [],
  "videos": [],
  "links": [
    {
      "href": "https://cohere.ai/",
      "label": "Cohere",
      "type": "a"
    },
    {
      "href": "https://github.com/jalammar/ecco",
      "label": "Ecco",
      "type": "a"
    },
    {
      "href": "https://docs.cohere.ai/intro-to-llms/",
      "label": "Intro to Large Language Models with Cohere",
      "type": "a"
    },
    {
      "href": "https://docs.cohere.ai/prompt-engineering-wiki/",
      "label": "A visual guide to prompt engineering",
      "type": "a"
    },
    {
      "href": "https://docs.cohere.ai/text-summarization-example/",
      "label": "Text Summarization",
      "type": "a"
    },
    {
      "href": "https://docs.cohere.ai/semantic-search/",
      "label": "Semantic Search",
      "type": "a"
    },
    {
      "href": "https://github.com/spotify/annoy",
      "label": "Annoy",
      "type": "a"
    },
    {
      "href": "https://github.com/facebookresearch/faiss",
      "label": "Faiss",
      "type": "a"
    },
    {
      "href": "https://github.com/lmcinnes/pynndescent",
      "label": "PyNNDescent",
      "type": "a"
    },
    {
      "href": "https://docs.cohere.ai/finetuning-representation-models/",
      "label": "Finetuning Representation Models",
      "type": "a"
    },
    {
      "href": "https://docs.cohere.ai/docs/training-a-representation-model",
      "label": "",
      "type": "a"
    },
    {
      "href": "https://twitter.com/JayAlammar/status/1490712428686024705",
      "label": "Twitter thread",
      "type": "a"
    },
    {
      "href": "https://arxiv.org/abs/1908.10084",
      "label": "Sentence BERT",
      "type": "a"
    },
    {
      "href": "https://arxiv.org/abs/2007.00808",
      "label": "Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval",
      "type": "a"
    },
    {
      "href": "https://docs.cohere.ai/token-picking/",
      "label": "Controlling Generation with top-k & top-p",
      "type": "a"
    },
    {
      "href": "https://docs.cohere.ai/text-classification-embeddings/",
      "label": "Text Classification Using Embeddings",
      "type": "a"
    },
    {
      "href": "http://127.0.0.1:4000/a-visual-guide-to-using-bert-for-the-first-time/",
      "label": "A Visual Guide to Using BERT for the First Time",
      "type": "a"
    },
    {
      "href": "https://docs.cohere.ai/",
      "label": "Cohere docs",
      "type": "a"
    },
    {
      "href": "https://github.com/cohere-ai/notebooks",
      "label": "notebooks repo",
      "type": "a"
    }
  ],
  "repair_version": 2,
  "repaired_at": "2026-10-14T10:52:32Z",
  "source_url": "https://jalammar.github.io/applying-large-language-models-cohere/",
  "papers": [
    {
      "status": "ok",
      "url": "https://arxiv.org/pdf/1908.10084",
      "bytes": 548961,
      "reused": true,
      "local_path": "papers/repair/20151599fbbbabacaa9e.pdf"
    },
    {
      "status": "ok",
      "url": "https://arxiv.org/pdf/2007.00808",
      "bytes": 629958,
      "reused": false,
      "local_path": "papers/repair/c3cb739555338ae8ac84.pdf"
    }
  ],
  "actual_video_files": [],
  "body_chars": 3695,
  "expected_body_images": 7,
  "discovery_status": "ok",
  "delivery_status": "ok",
  "missing_reason": "",
  "raw_html": "attachments/390599b6c2de/pages/source.html",
  "local_html": "attachments/390599b6c2de/pages/article.html",
  "body_base_path": "attachments/390599b6c2de/pages/",
  "body_markdown_path": "attachments/390599b6c2de/pages/article.md"
}