<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Zishaan Sayyed on Medium]]></title>
        <description><![CDATA[Stories by Zishaan Sayyed on Medium]]></description>
        <link>https://medium.com/@zish_2001?source=rss-35593e7532b3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*mmuCWkWelz3qeDwFHH05Rg.jpeg</url>
            <title>Stories by Zishaan Sayyed on Medium</title>
            <link>https://medium.com/@zish_2001?source=rss-35593e7532b3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 08:26:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zish_2001/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[LLMOps Life Cycle]]></title>
            <link>https://medium.com/@zish_2001/llmops-life-cycle-de1ba13b4184?source=rss-35593e7532b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/de1ba13b4184</guid>
            <category><![CDATA[finetune-llm]]></category>
            <category><![CDATA[llm-deployment]]></category>
            <category><![CDATA[llm-development]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[llmops]]></category>
            <dc:creator><![CDATA[Zishaan Sayyed]]></dc:creator>
            <pubDate>Thu, 14 Nov 2024 01:49:03 GMT</pubDate>
            <atom:updated>2024-11-14T01:49:03.539Z</atom:updated>
            <content:encoded><![CDATA[<p>Large language models (LLMs) are transforming enterprise AI with advanced natural language processing capabilities like text generation, sentiment analysis, and language translation, driving innovation and efficiency. LLMs automate customer service through chatbots, streamline content creation, and enhance decision-making by extracting insights from unstructured data. As these models grow in complexity and scale, their integration into business operations demands effective operational practices to ensure reliability, performance, and security. Without these practices, businesses risk deploying models that may underperform, exhibit biases, or fail to meet security standards, potentially leading to operational disruptions, losses and damage to reputation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/0*i2t3Lx2O9Nhnitmb.png" /></figure><p>Large Language Model Operations (LLMOps) refers to the specialized practices and processes involved in developing, deploying, testing, monitoring, and maintaining large language models in production environments. While LLMOps share many similarities with Machine Learning Operations (MLOps)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/0*IRIk0TunHp2i10fp.gif" /></figure><p>Let us now look at the various life cycle stages of LLMOps.</p><blockquote><strong>Stage 1: Data Preparation and Model Development:</strong></blockquote><p><em>Building the Foundation for Successful LLM Deployment</em></p><p>This is the foundational stage in the LLMOps life cycle, where the groundwork for creating a successful language model tailored to your organization’s needs is established. This phase consists of the following activities that are critical to ensure the performance and effectiveness of the LLM model being deployed.</p><p><strong>1. Data Sourcing, Preprocessing, Labelling &amp; Versioning</strong></p><p>High-quality, diverse training data from multiple sources and languages is essential for robust LLM performance. Strategies like web scraping, using open-source repositories, and collaborating with domain experts ensure datasets reflect real-world language complexities.‍</p><p>The sourced data is then denoised to remove irrelevant information and correct language errors. Other pre-processing steps include tokenization (i.e breaking text into words or sub-words) and normalization (converting text into standardized formats).</p><p>Next, data is annotated or labelled for specific LLM tasks, either manually by human experts using techniques like active learning or through crowd-sourcing platforms such as <a href="https://www.mturk.com/">Amazon Mechanical Turk</a>. Additionally, data augmentation techniques that diversify training samples can be used to enhance model performance.Finally, datasets and associated models are versioned to facilitate smooth transitions and improve reproducibility during iterative tuning and experimentation.‍</p><p>Data privacy and protection in LLMOps involves implementing anonymization and pseudonymization techniques, ensuring model security considerations, enforcing strict data access controls, and complying with data protection regulations such as <a href="https://gdpr-info.eu/">GDPR</a> and <a href="https://oag.ca.gov/privacy/ccpa">CCPA</a>.</p><p><strong>2. Architecture Selection</strong></p><p>Choosing the appropriate model architecture is a pivotal step. This involves selecting a model architecture that best fits the intended application and requirements. Different transformer architectures are suited for different applications or tasks as shown in the figure below.</p><p><em>Categories of LLM Architectures and their Use-Cases</em></p><figure><img alt="Categories of LLM Architectures and their Use-Cases" src="https://cdn-images-1.medium.com/max/1024/1*q22UstoRIfe5hw7qVHz79g.png" /></figure><p>Factors such as model complexity, scalability, and computational resources are considered to make a selection.</p><p><strong>3. Transfer Learning: Fine-tuning and Hyper-parameter Tuning</strong></p><p>Transfer learning involves leveraging knowledge gained from training a model on one task and applying it to a different but related task. In the context of LLMs, this typically means starting with a pre-trained model that has been trained on a large, general corpus of text. This model is then fine-tuned on a smaller, specific dataset relevant to a particular task or domain. This additional training data required is thoughtfully determined to avoid overfitting or underutilizing the model’s potential.‍</p><p>In contrast, hyperparameter tuning optimizes the external settings that govern the training process, such as learning rate, batch size, and the number of layers. Techniques like <a href="https://www.analyticsvidhya.com/blog/2021/06/tune-hyperparameters-with-gridsearchcv/">grid search</a>, <a href="https://www.analyticsvidhya.com/blog/2021/05/bayesian-optimization-bayes_opt-or-hyperopt/">Bayesian optimization</a>, and <a href="https://dl.acm.org/doi/abs/10.1145/2834892.2834896">evolutionary algorithms</a> explore the vast hyperparameter space to find the sweet spot for peak performance. Additionally, methods like <a href="https://arxiv.org/abs/1910.07454">learning rate schedules</a> and <a href="https://proceedings.neurips.cc/paper_files/paper/1991/hash/8eefcfdf5990e441f0fb6f3fad709e21-Abstract.html">weight decay</a> are leveraged to enhance generalization and mitigate overfitting. Hyperparameter tuning is often performed before fine-tuning to ensure the model is trained with optimal settings, making it a crucial step for achieving high accuracy and effective learning.‍</p><p>Some LLMs also undergo <a href="https://arxiv.org/abs/2403.03432">multi-task learning</a>, i.e simultaneously learn from multiple, related tasks. This enables them to leverage the relationships and common patterns across tasks, leading to better generalization and performance.‍</p><p><strong>4. Prompt Engineering and Versioning</strong></p><p>Starting from the model development stage, prompt engineering and versioning are integral to every stage of the LLMOps life cycle — whether it is testing, deployment, or maintenance. Prompt engineering guides the model to achieve desired outcomes during development, while prompt versioning tracks iterations for development and fine-tuning phases.‍</p><blockquote><strong>Stage 2: Testing</strong></blockquote><p><em>Ensuring Reliability and Performance of the LLM Model</em></p><p>Testing in LLMOps (Large Language Model Operations) is crucial to ensure the reliability, accuracy, and safety of deployed models, especially given the unique challenges posed by large language models (LLMs). Here are key aspects of testing specific to LLMs:</p><p><strong>1. Handling Hallucinations</strong></p><p>LLMs may generate plausible but incorrect responses (hallucinations). Testing methodologies focus on scenarios where models generate misleading or factually incorrect outputs. Techniques include <a href="https://arxiv.org/abs/2401.01313">adversarial testing</a> with structured inputs designed to provoke such errors, as well as human-in-the-loop verification to catch nuanced mistakes.‍</p><p><strong>2. Toxicity Checks and Guard Rails</strong></p><p>Testing LLMs includes toxicity checks to detect and mitigate harmful language or biased outputs that could perpetuate stereotypes or cause harm. This involves using natural language processing (NLP) tools to analyze model outputs for offensive or discriminatory language, ensuring outputs align with ethical guidelines.‍</p><p><a href="https://arxiv.org/abs/2310.10501">Guard rails</a> in LLMOps are safety mechanisms implemented to prevent LLMs from producing harmful or undesirable outputs. These can be heuristic-based filters or AI-driven policies that flag and block outputs violating predefined rules, ensuring compliance with ethical standards and legal regulations.</p><p><strong>3. Performance Metrics for LLMs</strong></p><p>Apart from traditional metrics like accuracy, precision, recall, and F1 score adapted for text generation tasks, LLM evaluation and testing includes a few other metrics that look at subjective aspects of language generation. Some examples include:‍</p><p><strong>Perplexity: </strong>Perplexity quantifies how well the model predicts the next word in a sequence of words. Lower perplexity indicates better performance and a better understanding of the language.‍</p><p><strong>ROUGE (Recall-Oriented Understudy for Gisting Evaluation): </strong>ROUGE is a set of metrics used to evaluate the quality of summaries by comparing them to reference summaries. It measures the overlap of n-grams (sequences of n words) between the model-generated summaries and human-written references. ROUGE-N (where N can be 1, 2, or 4) measures overlap at the level of unigrams, bigrams, or four-grams respectively.‍</p><p><strong>BLEU (Bilingual Evaluation Understudy): </strong>BLEU is another metric used for evaluating the quality of machine-translated text by comparing it to one or more human reference translations. It computes the precision of n-grams (usually up to 4-grams) in the generated text compared to the reference text. Higher BLEU scores indicate better translation quality.</p><blockquote><strong>Stage 3: Deployment</strong></blockquote><p><em>Transitioning the Trained Model to Production</em></p><p>LLMOps teams rigorously assess deployment strategies, meticulously considering infrastructure needs, scalability and performance requirements and security protocols.‍</p><p><strong>1. Infrastructure Setup</strong></p><p>Deploying LLMs starts by configuring essential infrastructure, which may include setting up cloud resources or dedicated servers with ample computational power and storage. This initial setup ensures the model can efficiently manage the computational requirements of inference tasks. Edge deployment optimizes LLMs to function closer to end-users, minimizing latency and improving real-time interactions. Selecting the optimal deployment strategy enhances the LLM’s availability and responsiveness, effectively meeting diverse application needs in practical scenarios.‍</p><p><strong>2. Integration</strong></p><p>Integrating LLMs into existing systems and workflows is essential for seamless operation. This process necessitates active collaboration among various teams, including domain experts, ethicists, user experience teams, and others. This phase may also involve developing APIs or other interfaces to facilitate communication between the model and other applications or databases. Compatibility and interoperability with existing technologies ensure smooth integration and usability.‍</p><p><strong>3. Scalability and Performance</strong></p><p>Scalability is crucial for handling varying loads and user demands in LLM deployment. LLMs must be optimized for concurrent requests, with dynamic resource scaling based on workload fluctuations. Techniques like load balancing and resource allocation ensure consistent performance. Latency, the delay between a request and response, is critical in real-time applications like chatbots, requiring optimized infrastructure and networking configurations, especially when using external APIs like OpenAI’s.‍</p><p>Balancing computational resources with operational costs and deployment timelines is essential in LLMOps. Cloud-based solutions offer dynamic scaling benefits, optimizing costs while maintaining performance.‍</p><p><strong>4. Security</strong></p><p>Ensuring the security of deployed LLMs involves robust measures like data encryption, access control, and adherence to GDPR or CCPA. Regular security audits and monitoring help mitigate vulnerabilities. When using cloud-hosted APIs from providers like OpenAI or Google, secure API usage, data transmission encryption, and strict access controls are critical. Compliance with providers’ security standards and regular reviews of their security updates are essential for maintaining a secure deployment environment.</p><blockquote><strong>Stage 4: Monitoring</strong></blockquote><p><em>Ensuring Continuous Model Performance and Reliability</em></p><p>Ongoing monitoring is essential for maintaining the performance and reliability of the deployed LLM model. By continuously observing the model’s behavior and performance in real-world scenarios, organizations can detect issues early and ensure the model continues to operate effectively. This phase involves:‍</p><p><strong>1. Performance Tracking</strong></p><p>Continuously measuring the model’s real-world performance is crucial to ensure it meets expected standards. This involves monitoring key performance metrics like accuracy, response time, throughput and resource utilization. Regular evaluations help identify deviations from expected behavior, possibly due to changes in data distribution or the real world, and allow for timely adjustments and improvements.‍</p><p><strong>2. Error Logging, Safety and Bias Monitoring</strong></p><p>Keeping track of any issues or anomalies that arise during the model’s operation is a critical aspect of monitoring. Error logging involves recording instances where the model fails to perform as expected, such as incorrect predictions, latency issues, or unexpected outputs. Analyzing these logs helps in diagnosing and addressing problems, thereby improving the model’s robustness and reliability.‍</p><p>Bias monitoring involves continuously evaluating the model’s outputs for fairness and mitigating any detected biases to ensure equitable performance. Safety monitoring focuses on ensuring the model operates securely, preventing harmful outputs and protecting against vulnerabilities such as data breaches and adversarial attacks.‍</p><p><strong>3. User Feedback</strong></p><p>Analyzing user feedback offers practical insights into the model’s performance, highlighting strengths and weaknesses. Incorporating this feedback into monitoring aids in refining and optimizing the model to better meet user expectations.</p><blockquote><strong>Stage 5: Maintenance</strong></blockquote><p><em>Sustaining Model Longevity and Relevance</em></p><p>Maintenance is the ongoing process of ensuring the deployed LLM model remains effective and relevant over time. This continuous effort is essential for maximizing the model’s longevity and ensuring it continues to deliver value to the organization. Key activities in this phase include:‍</p><p><strong>1. Updating the Model</strong></p><p>Regularly updating the model with new data and improvements ensures its accuracy and relevance. This involves incorporating new datasets, refining algorithms, and adapting to evolving language trends and user behavior, allowing the model to address changing business needs effectively. Regular updates and maintenance, enabled by automated pipelines, ensure that the LLM stays current with the latest advancements and data trends, maintaining its efficiency and adaptability.‍</p><p><strong>2. Bug Fixes and Enhancements</strong></p><p>Addressing any issue and improving functionalities is an ongoing aspect of maintenance. This includes identifying and resolving bugs, optimizing performance, and implementing enhancements to enrich the model’s capabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NrjzuGgBRgKXX5dtsaik4A.png" /><figcaption>All Stages of LLMops life cycle</figcaption></figure><h3>Ensuring Success through Comprehensive LLMOps:</h3><p>Each stage of the LLMOps life cycle is crucial for the success of large language models in enterprise applications. From strong model development and reliable, fair testing to seamless, secure deployment, every step is vital. Continuous monitoring maintains performance and addresses issues, while ongoing maintenance ensures relevance. Bias and safety monitoring throughout ensures fairness and security, maintaining trust in the model’s outputs. By following these comprehensive LLMOps practices and staying informed about advancements, organizations can maximize their LLM models’ potential, drive innovation, achieve sustained value, and ensure their models deliver maximum impact while remaining at the forefront of AI innovation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de1ba13b4184" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pllava : Chat With your Video Files.]]></title>
            <link>https://medium.com/@zish_2001/pllava-chat-with-your-video-files-e8e55f08cae2?source=rss-35593e7532b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8e55f08cae2</guid>
            <category><![CDATA[pllava]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[visual-analysis]]></category>
            <category><![CDATA[llama-2]]></category>
            <dc:creator><![CDATA[Zishaan Sayyed]]></dc:creator>
            <pubDate>Sat, 11 May 2024 09:31:04 GMT</pubDate>
            <atom:updated>2024-05-11T09:31:04.517Z</atom:updated>
            <content:encoded><![CDATA[<h3>Pllava : Chat With your Video Files.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tq8Ia7qPP7FXmN_FVhuFyQ.png" /></figure><blockquote>INTRO to VLP:</blockquote><p>Vision-language pre-training (VLP) has been a game-changer in enhancing performance across various vision-language tasks. However, its application to video data presents significant computational and data challenges. In this blog, we explore a novel and resource-efficient approach to adapting existing image-language pre-trained model to video datasets.</p><p>Initial experiments revealed that <strong>directly fine-tuning pre-trained models with multiple frames on video datasets often leads to performance stagnation or decline in caption-related tasks.</strong> Additionally, these models are susceptible to prompts and tend to generate short descriptions.</p><blockquote>POOLING STRATEGY:</blockquote><p>A deep analysis indicates that the performance issues stem from the dominance of certain patches within individual video frames. <strong>To address this, we propose a straightforward yet effective pooling strategy aimed at smoothing the feature distribution along the temporal dimension</strong> and thus reduce the dominant impacts from some extreme tokens. <strong>The new model is termed Pooling LLaVA, or PLLaVA in short. </strong>This strategy aims to mitigate the influence of extreme tokens and enhance model performance.</p><p>There are two dimensions for the pooling strategy:</p><ol><li>the spatial dimension</li><li>the temporal dimension</li></ol><p>Its found that reducing the spatial dimension with a larger temporal dimension could lead to better model performance, compared to reducing the temporal dimension directly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*GaBnE2wJe4f5sYVJfxmUeQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*3I4wrkYtl1hh56UClBsodQ.png" /><figcaption>(1) Effect of Spatial and Temporal Dimensions. (2) Pllava Framework.</figcaption></figure><blockquote>BENCHMARK:</blockquote><p>The resulting model achieves outstanding results across all evaluated datasets. Specifically, on the Video ChatGPT benchmark, PLLaVA achieves a score of 3.48 out of 5 on average across five dimensions, surpassing the previous state-of-the-art (SOTA) score from GPT4V (IG-VLM) by 0.31 points. On the MVBench multi-choice benchmark, PLLaVA achieves an average accuracy of 58.1% across 20 sub-tasks, surpassing GPT4V (IG-VLM) by 14.5%.</p><p>These findings demonstrate the effectiveness of PLLaVA in tackling video-based vision-language tasks and establish it as the new state-of-the-art model in the field.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*0bHTJ0b3BOfJDBmcw_qGTw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RiArh73eRoAk8OG5vtA3cg.png" /><figcaption>Performance Metrics.</figcaption></figure><blockquote>Hands On:</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FnAEje8tu18U%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DnAEje8tu18U&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FnAEje8tu18U%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/904de7e9234bd2c19733ab678c8f2317/href">https://medium.com/media/904de7e9234bd2c19733ab678c8f2317/href</a></iframe><p>Here are some detailed information of the obtained models:</p><ol><li>pllava-7b: <a href="https://huggingface.co/llava-hf/llava-v1.6-vicuna-7b-hf">llava-hf/llava-v1.6-vicuna-7b-hf · Hugging Face</a></li><li>pllava-13b: <a href="https://huggingface.co/llava-hf/llava-v1.6-vicuna-13b-hf">llava-hf/llava-v1.6-vicuna-13b-hf · Hugging Face</a></li><li>pllava-34b: <a href="https://huggingface.co/llava-hf/llava-v1.6-34b-hf">llava-hf/llava-v1.6–34b-hf · Hugging Face</a></li></ol><p>You can test and experience the hands on of PLLAVA your self here on your own video clip:</p><p><a href="https://huggingface.co/spaces/DiscloseAI/pllava-7b-demo">https://huggingface.co/spaces/DiscloseAI/pllava-7b-demo</a></p><blockquote>Resources</blockquote><ol><li><a href="https://github.com/magic-research/PLLaVA/tree/main">Github</a></li><li><a href="https://pllava.github.io/">Official-Site</a></li></ol><p>Thank You.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8e55f08cae2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Grok 1 — by xAI.]]></title>
            <link>https://medium.com/@zish_2001/grok-1-by-xai-96564c4e2a60?source=rss-35593e7532b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/96564c4e2a60</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[hugging-face]]></category>
            <category><![CDATA[elon-musk]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <dc:creator><![CDATA[Zishaan Sayyed]]></dc:creator>
            <pubDate>Tue, 19 Mar 2024 04:21:05 GMT</pubDate>
            <atom:updated>2024-03-19T04:32:41.920Z</atom:updated>
            <content:encoded><![CDATA[<h3>Grok 1 — by xAI.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DICen-mgdpUZOZxIjUK3Uw.jpeg" /></figure><p>After the deliverance of <a href="https://academictorrents.com/details/5f96d43576e3d386c9ba65b883210a393b68210e">weights and architecture</a> of Grok by <a href="https://x.ai/blog">xAI</a>. Its clear that LLM (Large Language Model) is long gone and its time for HLM (Huge Language Model). This Mixture-of-Experts Model was released with 314 Billion parameter, under <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 license</a>. This model is not fine-tuned for any specific application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1R3a43w-MAvW1THna3kaMw.png" /><figcaption><em>The cover image was generated using </em><a href="https://midjourney.com/"><em>Midjourney</em></a><em> based on the following prompt proposed by Grok: A 3D illustration of a neural network, with transparent nodes and glowing connections, showcasing the varying weights as different thicknesses and colors of the connecting lines.</em></figcaption></figure><h3><strong>What is Grok?</strong></h3><p>With 314 Billion parameters, Grok becomes the largest open-source model in the market right now. Compared to OpenAI’s GPT-3 which was considered a leap forward on it’s release in 2020. Grok is more than triple the size of GPT-3.</p><p>It is designed to reply in a witty way and has some humor in its response. Unlike other LLMs Grok has real-time knowledge of the world from X platform. It also answers questions that are rejected by most of the LLMs.</p><p>Grok is still in a beta stage, which was just trained for 2 months. But it will rapidly improve day by day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*ph6SWF1FxEyXfnRHqKQpDA.jpeg" /></figure><h3><strong>Features Of Grok:</strong></h3><ol><li>Uses Mixture-of-Expert architecture within the model. This technique helps the model to dynamically map the input to different “Expert” networks, making the model to scale to a very large number of parameters efficiently.</li><li>It has 8 experts with 2 active experts.</li><li>Uses Rotary Positional Embeddings (RoPE), this allows the model to handle sequence position information more effectively.</li><li>Grok has Context size of 8192 tokens.</li><li>Grok has vocab size of 131072.</li><li>Grok is open-source and Apache 2.0 licenses.</li><li>For effective storage and faster computation it uses quantized weights.</li><li>This model is trained on large amount of text data, and not fine-tuned for any particular task.</li></ol><h3><strong>Benchmark of Grok:</strong></h3><p>Grok’s MMLU score is of 73% and it beats Llama 2 70B’s at 68.9% and Mixtral 8x7B’s at 70.6%.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IiyBlhG3lTpvIiUlhm974g.jpeg" /></figure><h3><strong>How to install Grok:</strong></h3><p>The instructions on loading and running Grok-1 are explained on <a href="https://github.com/xai-org/grok-1">this </a>GitHub repository. Clone the repo to your local. This repository contains JAX example code for loading and running the Grok-1 open-weights model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*A0cZAVFtAxfeZTc3eTcKDQ.jpeg" /></figure><p>Due to the large size of the model (314B parameters), a machine with enough GPU memory is required to test the model with the example code.</p><h3><strong>Implementation of Grok-1 Tokenizer:</strong></h3><p>We now have a Huggingface version of Grok-1 tokenizer adapted from <a href="http://xai-org/grok-1">xai-org/grok-1</a>). Grok-1 can now be used from Huggingface libraries that include <a href="https://github.com/huggingface/transformers">Transformers</a>, <a href="https://github.com/huggingface/tokenizers">Tokenizers</a>, and <a href="https://github.com/xenova/transformers.js">Transformers.js</a>.</p><p>For example:</p><p>Transformers/Tokenizers:</p><pre>from transformers import LlamaTokenizerFast<br><br>tokenizer = LlamaTokenizerFast.from_pretrained(&#39;Xenova/grok-1-tokenizer&#39;)<br>assert tokenizer.encode(&#39;hello world&#39;) == [21560, 1135]</pre><p>Transformers.js:</p><pre>import { AutoTokenizer } from &#39;@xenova/transformers&#39;;<br><br>const tokenizer = await AutoTokenizer.from_pretrained(&#39;Xenova/grok-1-tokenizer&#39;);<br>const tokens = tokenizer.encode(&#39;hello world&#39;); // [21560, 1135]</pre><h3><strong>For more details follow:</strong></h3><ul><li>Paper: <a href="https://x.ai/blog/grok-os">https://x.ai/blog/grok-os</a></li><li>Code: <a href="https://github.com/xai-org/grok-1">https://github.com/xai-org/grok-1</a></li><li><a href="https://huggingface.co/xai-org/grok-1">https://huggingface.co/xai-org/grok-1</a></li><li><a href="https://huggingface.co/Xenova/grok-1-tokenizer">https://huggingface.co/Xenova/grok-1-tokenizer</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96564c4e2a60" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>