joinus = """ ## Join us : 🌟TeamTonic🌟 is always making cool demos! Join our active builder's 🛠️community 👻 [![Join us on Discord](https://img.shields.io/discord/1109943800132010065?label=Discord&logo=discord&style=flat-square)](https://discord.gg/qdfnvSPcqP) On 🤗Huggingface:[MultiTransformer](https://huggingface.co/MultiTransformer) On 🌐Github: [Tonic-AI](https://github.com/tonic-ai) & contribute to🌟 [Build Tonic](https://git.tonic-ai.com/contribute)🤗Big thanks to Yuvi Sharma and all the folks at huggingface for the community grant �� """ title = """# 🦙 Welcome to Tonic's Llama-3.1-8B-Instruct GemLite Demo 🚀""" description = """This demo runs the Mobius Labs Llama-3.1-8B-Instruct model, quantized with GemLite and accelerated with TorchAO. Llama 3.1 is a state-of-the-art open large language model from Meta, supporting advanced reasoning, code, and conversation. This demo uses the official Llama 3.1 prompt format and is optimized for fast inference on consumer GPUs. Model: mobiuslabsgmbh/Llama-3.1-8B-Instruct_gemlite-ao_a16w4_gs_128_pack_32bit Backend: GemLite (TorchAO) Format: 4-bit quantized, group size 128 """ presentation1 = """Try this model on [Hugging Face](https://huggingface.co/mobiuslabsgmbh/Llama-3.1-8B-Instruct_gemlite-ao_a16w4_gs_128_pack_32bit). Llama-3.1-8B-Instruct is a conversational and reasoning model from Meta, quantized and optimized by Mobius Labs using GemLite. - **Model size:** 8B parameters - **Quantization:** 4-bit (group size 128) - **Backend:** GemLite (TorchAO) - **Prompt format:** Official Llama 3.1 format - **License:** llama3 This model is suitable for chat, code, and general reasoning tasks. """ presentation2 = """### Model Architecture Llama-3.1-8B-Instruct uses a dense decoder-only Transformer architecture. **Architecture Type:** Dense decoder-only Transformer **Model Size:** 8B parameters **Quantization:** 4-bit, group size 128 (GemLite) **Prompt Format:** Llama 3.1 official **License:** llama3 """ customtool = """{ "name": "custom_tool", "description": "A custom tool defined by the user", "parameters": { "type": "object", "properties": { "param1": { "type": "string", "description": "First parameter of the custom tool" }, "param2": { "type": "string", "description": "Second parameter of the custom tool" } }, "required": ["param1"] } }""" example = """{{ "name": "get_current_weather", "description": "Get the current weather in a given location", "parameters": {{ "type": "object", "properties": {{ "location": {{ "type": "string", "description": "The city and state, e.g. San Francisco, CA" }}, "unit": {{ "type": "string", "enum": ["celsius", "fahrenheit"] }} }}, "required": ["location"] }} }}""" # Example inputs for the Gradio demo (imported in app.py) examples = [ [ "What are the main differences between Llama 2 and Llama 3?", "", 512, 0.7, 0.9, False, False, "" ], [ "Write a Python function to compute the Fibonacci sequence.", "", 256, 0.6, 0.95, False, False, "" ], [ "What is the weather in Paris today?", "", 128, 0.7, 0.9, False, True, example ], [ "Summarize the following text: Artificial intelligence is transforming industries by automating tasks and providing insights from data.", "", 128, 0.5, 0.95, False, False, "" ] ]