FLOCK 백서

FLOCK

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 16쪽 중 12쪽

he Aptos blockchain. This decentralized approach not only addresses the unique requirements of Move—such as resource-oriented asset handling—but also excels in tasks ranging from simple scripts to more complex applications like yield tokenization with AMM functionality. FLock’s model consistently demonstrates higher accuracy and alignment with Aptos-specific criteria compared to generalized LLMs. Looking ahead, FLock plans to expand its dataset with expert annotations and establish rigorous benchmarks to further refine the LLM’s capabilities. A production-ready model will be deployed on FLock.’s federated learning platform, supporting ongoing, decentralized improvements as it adapts to real-time needs and incorporates proprietary Move codebases. By integrating FLock.’s advanced LLM with the Aptos network, the collaboration enhances Move developer productivity, highlights the value of community-driven AI training, and showcases how decentralized AI can transform specialized coding tasks in the blockchain ecosystem. Read more about the partnership [here](https://www.flock.io/blog/flockio-integrates-with-aptos-to-turbocharge-ai-assisted-move-language-coding-copilot) or explore more FLock models [here](https://train.flock.io/explore). # AI Assistants - Farcaster GPT, Scroll GPT and many more to come! FLock is at the forefront of decentralized training platforms, enabling the development and deployment of AI assistants in a collaborative environment. By leveraging community contributions and innovative training techniques, FLock exemplifies how decentralized platforms can revolutionize AI development. Two notable AI assistants, Farcaster GPT and Scroll GPT, serve as real-life use cases of FLock's capabilities. ## Farcaster GPT: Harnessing Community Collaboration Farcaster GPT is an AI assistant developed through the innovative [AI Arena](/flock-products/ai-arena). This project marked a significant milestone as it was part of the first-ever hackathon for AI Arena, hosted during the Base Onchain Summer Buildathon. The development process exemplified community-driven collaboration, where participants were tasked with training a chatbot using [Farcaster documentation](https://docs.farcaster.xyz/). The winning model, developed by Yifan Xie, is available on Hugging Face: [Mistralai-Mistral-7B-Instruct-v0.3](https://huggingface.co/yifanxie/mistralai-Mistral-7B-Instruct-v0.3-1719254473). This model showcases the potential of community collaboration in achieving significant advancements in AI development. The success of Farcaster GPT highlights how FLock facilitates the creation of powerful AI models through decentralized and collaborative efforts. ## Scroll GPT: A Community-Driven RAG-based Model Scroll GPT is another exemplary AI assistant, co-created by the community, and is hosted on the FLock platform. This model is based on Retrieval-Augmented Generation (RAG), which enhances the chat experience by integrating external knowledge sources. The collaborative nature of Scroll GPT's development illustrates how FLock enables community members to contribute their expertise and knowledge. Hosted at [FLock](https://beta.flock.io/model/cls4fv9ev0019jy82egcigw4a), Scroll GPT offers a live chat interface where users can contribute their knowledge and earn points. This interactive platform fosters continuous improvement of the AI model, driven by real-time contributions from the community. FLock's collaboration with other community projects and protocols, such as Scroll, exemplifies its ability to integrate with broader ecosystems. Through partnerships and campaigns, FLock empowers participants to earn additional points, incentivising active engagement and knowledge sharing. This collaborative model demonstrates how decentralised platforms like FLock can facilitate innovation and community growth, setting a new standard for AI development. # AI Companions - Professor Grump w/ Akash Run FLock node on Akash network *NOTE: This post was originally published on the* [*Akash Blog*](https://akash.network/blog/decentralized-ai-model-training-on-akash-with-flockio/)*.* ## Introduction Developing truly open and decentralised AI is one of society’s most critical challenges. The networks, platforms, and clients we build will help guide this development, from open compute networks like [Akash](https://akash.network/docs/) to platforms like FLock that make it easy to train and fine-tune AI models. Integrating these projects simplifies the user experience, enabling greater access that puts AI development directly in the hands of people around the world. This case study outlines the integration between Akash and FLock that enables users to easily train AI models on decentralised compute. It illustrates how Akash, the first open-source Supercloud, gives AI developers access to the high-performance compute resources needed to train AI models with FLock.io, a platform for decentralised machine learning. ## Birds of a Feather: Akash & FLock As the adage goes, “birds of a feather flock together.” As the decentralized AI movement takes flight, Akash and FLock.io are flying in unison. Akash is an open network that lets users buy and sell computing resources securely and efficiently. FLock.io is an open network that lets users train, validate, and govern AI models democratically and transparently. Akash is purpose-built for public utility. Compute is available to anyone on the network through Akash’s peer-to-peer marketplace, and the network does not limit the types of tasks or workloads that can be deployed. Similarly, FLock.io is built for and by the community, and the platform does not restrict where models are trained, validated, hosted, and/or deployed. With a clear alignment on visions for the future and shared values of openness, permissionlessness, and composability, it’s clear to see why Akash and FLock.io are closely aligned. As you'll see below, FLock has integrated with Akash to create 1-click templates that make it easy to run FLock.io nodes on the Akash Supercloud. ## Running a Flock Validator on Akash Network Video Tutorial: {% embed url="<https://youtu.be/KRxbiYrN1Ho>" %} ### Stake Flock token and generate an API key Follow the steps 1 and 2 mentioned in our [validator guide](https://docs.flock.io/flock-product/decentralised-ai-training/validator-guide) to stake Flock token for a validation task and generate an API. ### Create an Akash account You will need a Keplr or Leap wallet to create an Akash account. Go to <https://console.akash.network/> <figure><img src="https://742781353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1RpcbvTSHzzPwOSUvgKU%2Fuploads%2FL4mN0KHtRih6SEelePWN%2Fflock-1.png?alt=media&amp;token=215db1c8-6ff6-4125-a942-d5376146e3ed" alt=""><figcaption></figcaption></figure> Click “CONNECT WALLET” to connect a Keplr or Leap wallet.&#x20; <figure><img src="https://742781353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1RpcbvTSHzzPwOSUvgKU%2Fuploads%2FwgKrFeI3LpFCNGWxJCEH%2Fflock-2.png?alt=media&amp;token=6941d221-9691-440d-a306-f68ec5d6d7e9" alt=""><figcaption></figcaption></figure> When connected to your Keplr wallet, Akash console would show the USDC and AKT balance in your wallet. Deployment on Akash will consume your USDC or AKT. ### Get AKT token You can buy some AKT from any CEX or DEX below, then you need to transfer your AKT to your Keplr or Leap wallet. <figure><img src="https://742781353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1RpcbvTSHzzPwOSUvgKU%2Fuploads%2FBiUIz5ocNPSXXvqjjD2z%2Fflock-3.png?alt=media&amp;token=a69811e2-028e-4a7e-9905-bb4e76a5968c" alt=""><figcaption></figcaption></figure> ### Deployment Choose Flock validator template from templates page <https://console.akash.network/templates> (Docker image link: <https://hub.docker.com/repository/docker/z471899214308/llm-loss-validator>) Click deploy <figure><img src="https://742781353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1RpcbvTSHzzPwOSUvgKU%2Fuploads%2FFuticPwtJiv3Ls1EQbYP%2Fflock-4.png?alt=media&amp;token=78906ba9-d3ab-4772-9508-b199c831845f" alt=""><figcaption></figcaption></figure> Input your Flock API and task ID you have staked FLock token on. <figure><img src="https://742781353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1RpcbvTSHzzPwOSUvgKU%2Fuploads%2FWBV0WH0Z3azaqPwmNHtC%2Fflock-6.png?alt=media&amp;token=07d0d0d0-20a2-4842-bb66-d8235d9903f6" alt=""><figcaption></figcaption></figure> Then change the storage to a minimum of 50Gi in builder page, click create deployment. <figure><img src="https://742781353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1RpcbvTSHzzPwOSUvgKU%2Fuploads%2FDwCZClbjl0YEb6QZMwBC%2Fflock-7.png?alt=media&amp;token=c10ba8c4-8635-480d-9bd2-617ea8cded4b" alt=""><figcaption></figcaption></figure> You can also use the YML file to create deployment. Add your Flock API Key and the Task ID {% file src="/files/f0XQq0vZJ51iEO4LxDQf" %} Choose a provider who is audited, click accept bid. <figure><img src="https://742781353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1RpcbvTSHzzPwOSUvgKU%2Fuploads%2F6YkNuLvqx8flCHrifTJX%2Fflock-8.png?alt=media&amp;token=bfdfade6-a322-4133-be35-2b6eacbfdc82" alt=""><figcaption></figcaption></figure> Then the Flock validator will run automatically in 10 min. <figure><img src="https://742781353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1RpcbvTSHzzPwOSUvgKU%2Fuploads%2FB61jc4RN79x35zoe4gWb%2Fflock-9.png?alt=media&amp;token=daefca08-7e0c-4a50-9642-b4019217a545" alt=""><figcaption></figcaption></figure> <figure><img src="https://742781353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1RpcbvTSHzzPwOSUvgKU%2Fuploads%2FCpwebShz3Pt0MJd8lmhl%2Fflock-10.png?alt=media&amp;token=8a9dde1d-794e-42ce-81fe-f3d8022ebf03" alt=""><figcaption></figcaption></figure> <figure><img src="https://742781353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1RpcbvTSHzzPwOSUvgKU%2Fuploads%2Fpo4EwYfBVLj3kKP8yySF%2Fflock-11.png?alt=media&amp;token=bbc004d9-1a18-4327-bdf3-228af3afdd81" alt=""><figcaption></figcaption></figure> *** ## Create Deployment (Optional) This section is if you wish to run your custom deployment Click the “DEPLOY” in the upper left corner, and select “Rent GPUs” to rent a GPU <figure><img src="https://742781353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1RpcbvTSHzzPwOSUvgKU%2Fuploads%2FLJRoNbNYh6MtDNytw6wv%2Fflock-12.png?alt=media&amp;token=00183fdf-27bb-47f3-ae6c-d04b9dacd76b" alt=""><figcaption></figcaption></figure> The GPU on the Akash platform is provided to users through docker containers. So you need to provide the image information of the docker container to be deployed, and the hardware configuration of the container. Choose the GPU count, vCPU count, RAM size. <figure><img src="https://742781353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1RpcbvTSHzzPwOSUvgKU%2Fuploads%2FeXwad4Ap16mtN2zKhhkr%2Fflock-13.png?alt=media&amp;token=b4f34043-d856-4432-8832-d2e5fcd02c64" alt=""><figcaption></figcaption></figure> You can use flockvalidator/pytorch:2.0.1-py3.10-cuda11.8.0-devel-ubuntu22.04 as your docker image, use 8vCPU, 24GB Memory and 60G storage. <figure><img src="https://742781353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1RpcbvTSHzzPwOSUvgKU%2Fuploads%2FWjNsl6fuoRcdVKNeq1NA%2Fflock-14.png?alt=media&amp;token=259ecb71-2e9f-4270-a059-37c5f5ab3a28" alt=""><figcaption></figcaption></figure> After the container configuration is selected, you will enter the provider selection page. You can see all providers that meet the configuration requirements, and their prices and availability are marked. Select one and proceed. <figure><img src="https://742781353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1RpcbvTSHzzPwOSUvgKU%2Fuploads%2FzTuT039tpFH2fsG3IM11%2Fflock-15.png?alt=media&amp;token=2b283afa-005d-44ad-9344-bfe30be3ff6e" alt=""><figcaption></figcaption></figure> After deployment, you can enter the "SHELL" tab and use the sh command to configure the environment and run the validator. For advanced users, you can configure sshd service and login via third-party tools such as mobaxterm, xshell. <figure><img src="https://742781353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1RpcbvTSHzzPwOSUvgKU%2Fuploads%2FqwWA6ZFmlS4ingWzSAT9%2Fflock-16.png?alt=media&amp;token=3678e579-7b93-4420-ab33-713c1a811d4e" alt=""><figcaption></figcaption></figure> # Web3 Agents - Text2SQL Agent Web 3 Agent's Text2SQL model represents a significant leap forward in simplifying database queries by allowing users to interact with databases using natural language commands. Developed on FLock's AI Arena platform, this model showcases how decentralised training platforms can transform complex tasks into accessible solutions for a wide range of users, from business analysts to developers. ## Simplifying Database Queries with Text2SQL The Text2SQL model is designed to enable users to query databases effortlessly using simple, natural language commands, eliminating the need for complex SQL syntax. This innovation bridges the gap between users and their data, making data retrieval both intuitive and efficient. By allowing users to articulate their queries in everyday language, the Text2SQL model democratises access to data, empowering individuals without extensive technical expertise to extract valuable insights from complex datasets. Whether you are a business analyst seeking insights, a data scientist analysing trends, or a developer integrating data-driven functionalities, the Text2SQL model enhances productivity by simplifying the data retrieval process. This model exemplifies how AI can streamline workflows and improve accessibility, enabling more people to harness the power of data. ## Training and Validation with Community Collaboration The development of the Text2SQL model was conducted through FLock's AI Arena platform, which emphasises collaborative and community-driven AI development. The training data for this task was based on open-sourced Text2SQL datasets, providing a foundation for the model's capabilities. However, these datasets often contained inaccuracies, posing challenges for effective model training. To address this, the task creator undertook extensive cleaning and manual review to ensure the accuracy and reliability of the final validation set. This rigorous approach highlights the importance of data quality in AI development and underscores FLock's commitment to fostering robust and reliable AI models. By leveraging the collective expertise of the community, FLock ensures that models like Text2SQL are both powerful and practical. ## FLock's Role in Advancing AI Innovation The development of the Text2SQL model on FLock's AI Arena platform demonstrates the platform's role in advancing AI innovation. By providing a decentralised environment for training and development, FLock enables diverse communities to collaborate and contribute to cutting-edge AI projects. This approach not only accelerates the pace of innovation but also ensures that AI solutions are relevant and adaptable to real-world challenges. Through initiatives like Text2SQL, FLock continues to push the boundaries of what is possible in AI development, empowering users across various domains to interact with data in more meaningful ways. The success of the Text2SQL model illustrates FLock's potential to drive transformative change in how people access and utilise information, paving the way for a future where data is truly democratised. # Privacy-preserving Healthcare Beyond our work in the Web3 ecosystem, FLock is equally relevant in the Web2 world, and our flagship collaboration with a leading British hospital affiliated with a Top UK university is an excellent testimony to this. One of the biggest challenges of building AI models in the healthcare sector is data sharing. Since healthcare data is private, sensitive, and heterogeneous, collecting sufficient data for modelling is exhausted, costly, and sometimes impossible.&#x20; \ FLock’s groundbreaking approach in leveraging blockchain-enabled FL has proven to be effective in preserving data privacy while significantly improving prediction accuracy compared to traditional methods. This approach facilitates global collaboration, allowing healthcare institutions to contribute to model training without sharing sensitive healthcare data directly. Our work has been tested in blood glucose prediction as a pilot but can be readily extended to model other chronic diseases or address broader healthcare challenges. # Litepaper You can view our Litepaper [here](https://ucwlvzgpqvoxldczjggo.supabase.co/storage/v1/object/public/flock-blog/FLock_Litepaper_27122024.pdf). # Whitepaper Read our Whitepaper! * FLock's whitepaper is available [here](https://www.flock.io/whitepaper).&#x20; * FOMO's whitepaper is available [here](https://ucwlvzgpqvoxldczjggo.supabase.co/storage/v1/object/public/flock-blog/fomo_whitepaper.pdf). # Publications Find out more about our publications at: [Google Scholar](https://scholar.google.com/citations?hl=en\&user=s0eOtD8AAAAJ). * N. Dong, J. Sun, Z. Wang, S. Zhang, S. Zheng, "FLock: Defending Malicious Behaviors in Federated Learning with Blockchain" in NeurIPS 2022 Workshops on Decentralization and Trustworthy Machine Learning in Web3: Methodologies, Platforms, and Applications. Best Paper Runner-up Award. Available at: <https://ai-secure.github.io/DMLW2022/assets/papers/5.pdf>&#x20; * N. Dong, Z. Wang, J. Sun, M. Kampffmeyer, W. Knottenbelt and E. Xing, "Defending Against Poisoning Attacks in Federated Learning with Blockchain," in IEEE Transactions on Artificial Intelligence, <https://ieeexplore.ieee.org/abstract/document/10471193> * Z. Wang, N. Dong, J. Sun, W. Knottenbelt and Y. Guo, "zkFL: Zero-Knowledge Proof-based Gradient Aggregation for Federated Learning," in IEEE Transactions on Big Data, <https://ieeexplore.ieee.org/abstract/document/10535217> \ ***More papers to come*** # Glossary | Keyword | Reasoning | | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Model Fintuning | Model fine-tuning adapts a pre-trained machine learning model for a related task. Instead of training from scratch, this method uses a model that has already learned useful features from another task and fine-tunes it on a new dataset or task. | | Model Inference | The model has already been trained and evaluated, and has been deployed into the actual target hardware. Data is input into the model, and the model predicts the results. | | Large Language Model/LLM | A type of artificial intelligence model aimed at understanding and generating human language. Trained on a large amount of text data, it can perform a wide range of tasks, including text summarization, translation, sentiment analysis, and so on. | | Federated learning | A new paradigm in machine learning aims to train centralized models while keeping a large amount of client-side training data from being uploaded to avoid data leaks. | | Deep Gradient Compression/DGC | Reduce the ne
프로젝트로 돌아가기