
Latent Space: The AI Engineer Podcast
Latent Space is heating up! Our paper club https://lu.ma/llm-paper-club ran into >99 person Discord limits, oops. We are also introducing 2 new online meetups: LLM Paper Club Asia https://lu.ma/llm-paper-asia for Asia timezone (led by Ivan), and AI in Action: hands-on application of AI https://lu.ma/el0y5mpi (led by KBall). To be notified of all upcoming Latent Space events, subscribe to our new Luma calendar https://lu.ma/ls (sign up for individual events, or hit the RSS icon to sync all events to calendar). In the halcyon open research days of 2022 BC (Before-ChatGPT), DeepMind was the first to create a SOTA multimodal model by taking a pre-existing LLM (Chinchilla 80B https://arxiv.org/abs/2203.15556- now dead https://news.ycombinator.com/item?id=37383413?) and pre-existing vision encoder (CLIP https://arxiv.org/abs/2103.00020) and training a “glue” adapter layer, inspiring a generation of stunningly cheap and effective multimodal models including LLaVA https://x.com/ChunyuanLi/status/1710299381335798202?s=20 (one of the Best Papers of NeurIPS 2023 https://www.latent.space/p/neurips-2023-papers), BakLLaVA https://github.com/SkunkworksAI/BakLLaVA and FireLLaVA https://twitter.com/lqiao/status/1748243039766925351. However (for reasons we discuss in today’s conversation), DeepMind’s Flamingo model was never open sourced. Based on the excellent paper https://storage.googleapis.com/deepmind-media/DeepMind.com/Blog/tackling-multiple-tasks-with-a-single-visual-language-model/flamingo.pdf, LAION stepped up to create OpenFlamingo https://laion.ai/blog/open-flamingo/, but it never scaled beyond 9B. Simultaneously, the M4 (audio + video + image + text multimodality) research team at HuggingFace announced https://x.com/SanhEstPasMoi/status/1632775840135016448?s=20 an independent effort to reproduce Flamingo up to the full 80B scale: The effort started in March, and was released in August 2023. We happened to visit Paris last year, and visited HuggingFace HQ to learn all about HuggingFace’s research efforts, and cover all the ground knowledge LLM people need to become (what Chip Huyen has termed https://huyenchip.com/2023/10/10/multimodal.html#clip) “LMM” people. In other words: What is IDEFICS? IDEFICS is an Open Access Visual Language Model, available in 9B https://huggingface.co/HuggingFaceM4/idefics-9b and 80B https://huggingface.co/HuggingFaceM4/idefics-80b model sizes. As an attempt to re-create an open-access version of Flamingo https://arxiv.org/abs/2204.14198, it seems to track very well on a range of multimodal benchmarks (which we discuss in the pod): You can see the reasoning abilities of the models to take a combination of interleaved images + text in a way that allows users to either describe images, ask questions about the images, or extend/combine the images into different artworks (e.g. poetry). 📷 From IDEFICS’s model card https://huggingface.co/HuggingFaceM4/idefics-80b-instruct and blog post https://huggingface.co/blog/idefics The above demo screenshots are actually fine-tuned instruct versions of IDEFICS — which are again in 9B https://huggingface.co/HuggingFaceM4/idefics-9b-instructand 80B https://huggingface.co/HuggingFaceM4/idefics-80b-instructversions. IDEFICS was built by connecting two unimodal models together to provide the multi-modality you see showcased above. * Llama https://huggingface.co/huggyllama/llama-65b v1 for language (specifically huggyllama/llama-65b https://huggingface.co/huggyllama/llama-65b) - the best available open model at the time, to be swapped for Mistral in the next version of IDEFICS * A CLIP https://github.com/mlfoundations/open_clip model for vision (specifically laion/CLIP-ViT-H-14-laion2B-s32B-b79K https://huggingface.co/laion/CLIP-ViT-H-14-laion2B-s32B-b79K - after a brief exploration of EVA-CLIP https://huggingface.co/QuanSun/EVA-CLIP, which we discuss on the pod) OBELICS: a new type of Multimodal Dataset IDEFICS’ training data used the usual suspect datasets, but to get to par with Flamingo they needed to create a new data set. Enter OBELICS https://huggingface.co/datasets/HuggingFaceM4/OBELICS: “An Open Web-Scale Filtered Dataset of Interleaved Image-Text Documents”: * 115B text tokens * 141M English documents * 353M images These bullets are carefully curated and filtered by going through Common Crawl dumps between FEB 2020 - FEB 2023. We discuss the 2 months of mindnumbing, unglamorous work creating this pipeline: There’s a lot of mentions of ‘multi-modal' web documents’ which deserves some explanation. We’ll show you instead of tell you: You can see from this graph that OBELICS ends up outperforming the other image-text pairs dataset (LAION in this case) when stacked head-to-head. You can view a subset of OBELICS and perform visualizations on them here https://atlas.nomic.ai/map/f2fba2aa-3647-4f49-a0f3-9347daeee499/ee4a84bd-f125-4bcc-a683-1b4e231cb10f: 2024 Update: WebSight et al Most of this interview was recorded on Halloween 2023 at HuggingFace’s headquarters in Paris: In anticipation of an IDEFICS v2 release. However, several roadblocks emerged, including a notable scandal around CSAM in LAION-5B https://www.theverge.com/2023/12/20/24009418/generative-ai-image-laion-csam-google-stability-stanford, which affected all models using that dataset. The M4 team have adopted a strategy of shipping smaller advancements in 2024, and the first ship of the year is WebSight https://huggingface.co/datasets/HuggingFaceM4/WebSight, a dataset of 823,000 HTML/CSS codes representing synthetically generated English websites, each accompanied by a corresponding screenshot (rendered with Playwright https://github.com/microsoft/playwright). This is intended for tasks like screenshot-to-code workflows like Vercel’s V0 or TLDraw https://www.latent.space/p/tldraw, and will be part of the dataset for IDEFICS-2. As noted in our Best Papers recap https://www.latent.space/p/neurips-2023-papers, synthetic data is emerging as one of the top themes of 2024, and the IDEFICS/OBELICS team have wasted no time enabling themselves with it. Timestamps * [0:00:00] Intro * [0:00:00] Hugo, Leo’s path into multimodality * [0:09:16] From CLIP to Flamingo * [0:12:54] Benchmarks and Evals * [0:16:54] OBELICS dataset * [0:34:47] Together Redpajama v2 * [0:37:12] GPT4 Vision * [0:38:44] IDEFICS model * [0:40:57] Query-Key Layernorm for training * [0:46:40] Choosing smaller vision encoders - EVA-CLIP vs SIG-GLIP * [0:49:02] IDEFICS v2 * [0:52:39] Multimodal Hallucination * [0:59:12] Why Open Source Multimodality * [1:05:29] Naming: M4, OBELICS, IDEFICS * [1:08:56] 2024 Update from Leo Show Notes * Introducing IDEFICS: An Open Reproduction of State-of-the-Art Visual Language Model https://huggingface.co/blog/idefics * IDEFICS Knowledge sharing memo: technical lessons and mistakes https://github.com/huggingface/m4-logs/blob/master/memos/README.md * Victor Sanh memo https://docs.google.com/document/d/1ZNGyVWYFUbzV0xuei4SED2QAakGjMpaaQALcKYQm46U/edit#heading=h.66l93vag25o8 * OBELICS: An Open Web-Scale Filtered Dataset of Interleaved Image-Text Documents https://huggingface.co/papers/2306.16527 * Papers cited: * BLOOM https://arxiv.org/abs/2211.05100: A 176B-Parameter Open-Access Multilingual Language Model * Barlow Twins https://arxiv.org/abs/2103.03230: Self-Supervised Learning via Redundancy Reduction * CLIP paper https://arxiv.org/abs/2103.00020: Learning Transferable Visual Models From Natural Language Supervision * Vision Transformers paper https://arxiv.org/abs/2010.11929: An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale * Flamingo paper https://arxiv.org/abs/2204.14198: a Visual Language Model for Few-Shot Learning * April 2022 preprint from DeepMind https://storage.googleapis.com/deepmind-media/DeepMind.com/Blog/tackling-multiple-tasks-with-a-single-visual-language-model/flamingo.pdf, blogpost https://deepmind.google/discover/blog/tackling-multiple-tasks-with-a-single-visual-language-model/ * VQAV2 paper https://paperswithcode.com/paper/making-the-v-in-vqa-matter-elevating-the-role: Making the V in VQA Matter: Elevating the Role of Image Understanding in Visual Question Answering * OK-VQA: A Visual Question Answering Benchmark https://arxiv.org/abs/1906.00067Requiring External Knowledgehttps://arxiv.org/abs/1906.00067(https://okvqa.allenai.org/) * MMBench: Is Your Multi-modal Model an All-around Player? https://arxiv.org/abs/2307.06281 * Qwen-VL https://arxiv.org/abs/2308.12966: A Versatile Vision-Language Model for Understanding, Localization, Text Reading, and Beyond * Sig-GLIP paper https://arxiv.org/pdf/2303.15343: Sigmoid Loss for Language Image Pre-Training https://arxiv.org/pdf/2303.15343 * Nougat https://facebookresearch.github.io/nougat/: Neural Optical Understanding for Academic Documents * MMC4 (Multimodal C4) https://arxiv.org/pdf/2304.06939v1.pdf: An Open, Billion-scale Corpus of Images Interleaved With Text * Dall-E 3 paper: Improving Image Generation with Better Captions https://cdn.openai.com/papers/dall-e-3.pdf * GPT-4V(ision) system card https://openai.com/research/gpt-4v-system-card from OpenAI * Query-Key Layernorm trick: paper https://arxiv.org/abs/2302.05442 (Scaling Vision Transformers to 22 Billion Parameters), tweet https://x.com/SanhEstPasMoi/status/1632775853640646657?s=20 * EVA-CLIP: Improved Training Techniques for CLIP at Scale https://arxiv.org/abs/2303.15389 * “We intially explored using a significantly bigger vision encoder (the biggest in open-access at that time) with EVA-CLIP https://huggingface.co/QuanSun/EVA-CLIP. However, we ran into training instabilities very quickly. To lower the risks associated to the change of vision encoder, we decided to continue with laion/CLIP-ViT-H-14-laion2B-s32B-b79K https://huggingface.co/laion/CLIP-ViT-H-14-laion2B-s32B-b79K which we have been using until that point. We will leave that swap for future iterations and will also consider using higher resolution images.” * Datasets * Together’s RedPajama-Data-v2 https://www.together.ai/blog/redpajama-data-v2: An open dataset with 30 trillion tokens for training large language models * LAION COCO: 600M synthetic captions from Laion2B-en https://laion.ai/blog/laion-coco/ * Chip Huyen’s writeup on LMMs https://huyenchip.com/2023/10/10/multimodal.html * Joseph Nelson of Roboflow on Latent Space https://www.latent.space/p/segment-anything-roboflow * HuggingFace M4 https://huggingface.co/HuggingFaceM4 * HuggingFace timm https://huggingface.co/docs/timm/index: library containing SOTA computer vision models, layers, utilities, optimizers, schedulers, data-loaders, augmentations, and training/evaluation scripts. It comes packaged with >700 pretrained models, and is designed to be flexible and easy to use. * Logan Kilpatrick declaring 2024 the year of Multimodal AI https://www.youtube.com/watch?v=bNZV9s3_u44&t=80sat AI Engineer Summit This is a public episode. If you'd like to discuss this with other subscribers or get access to bonus episodes, visit www.latent.space/subscribe https://www.latent.space/subscribe?utm_medium=podcast&utm_campaign=CTA_2
11,580 words · 6 speakers
Page updated · transcript and summary are machine-generated