ML Ops Platform at Cloudflare

Post Syndicated from Keith Adler original http://blog.cloudflare.com/mlops/


ML Ops Platform at Cloudflare

We’ve been relying on ML and AI for our core services like Web Application Firewall (WAF) since the early days of Cloudflare. Through this journey, we’ve learned many lessons about running AI deployments at scale, and all the tooling and processes necessary. We recently launched Workers AI to help abstract a lot of that away for inference, giving developers an easy way to leverage powerful models with just a few lines of code. In this post, we’re going to explore some of the lessons we’ve learned on the other side of the ML equation: training.

Cloudflare has extensive experience training models and using them to improve our products. A constantly-evolving ML model drives the WAF attack score that helps protect our customers from malicious payloads. Another evolving model power bot management product to catch and prevent bot attacks on our customers. Our customer support is augmented by data science. We build machine learning to identify threats with our global network. To top it all off, Cloudflare is delivering machine learning at unprecedented scale across our network.

Each of these products, along with many others, has elevated ML models — including experimentation, training, and deployment — to a crucial position within Cloudflare. To help our team continue to innovate efficiently, our MLOps effort has collaborated with Cloudflare’s data scientists to implement the following best practices.

Notebooks

Given a use case and data, the first step for many Data Scientist/AI Scientists is to set up an environment for exploring data, feature engineering, and model experiments. Jupyter Notebooks are a common tool to satisfy these requirements. These environments provide an easy remote Python environment that can be run in the browser or connected to a local code editor. To make notebooks scalable and open to collaboration, we deploy JupyterHub on Kubernetes. With JupyterHub, we can manage resources for teams of Data Scientists and ensure they get a suitable development environment. Each team can tailor their environment by pre-installing libraries and configuring user environments to meet the specific needs, or even individual projects.

This notebook space is always evolving as well. Open source projects include further features, such as:

  • nbdev – a Python package to improve the notebook experience
  • Kubeflow – the kubernetes native CNCF project for machine learning
  • depoyKF – ML Platforms on any Kubernetes cluster, with centralized configs, in-place upgrades, and support for leading ML & Data tools like Kubeflow, Airflow, and MLflow

GitOps

Our goal is to provide an easy-to-use platform for Data Scientists and AI Scientists to develop and test machine learning models quickly. Hence, we are adopting GitOps as our continuous delivery strategy and infrastructure management on MLOps Platform in Cloudflare. GitOps is a software development methodology that leverages Git, a distributed version control system, as the single source of truth for defining and managing infrastructure, application configurations, and deployment processes. It aims to automate and streamline the deployment and management of applications and infrastructure in a declarative and auditable manner. GitOps aligns well with the principles of automation and collaboration, which are crucial for machine learning (ML) workflows. GitOps leverages Git repositories as the source of truth for declarative infrastructure and application code.

A data scientist needs to define the desired state of infrastructure and applications. This usually takes a lot of custom work, but with ArgoCD and model templates, all it takes is a simple pull request to add new applications. Helm charts and Kustomize are both supported to allow for configuration for different environments and jobs. With ArgoCD, declarative GitOps will then start the Continuous Delivery process. ArgoCD will continuously check the desired state of the infrastructure and applications to ensure that they are synched with the Git repository.

In the future, we plan to migrate our platform (including Jupyterhub) to Kubeflow, a machine learning workflow platform on Kubernetes that simplifies the development, deployment, and management of notebooks and end-to-end pipelines. This is best deployed using a new project, deployKF, which allows for distributed configuration management across multiple components available with Kubeflow, and others that extend beyond what is offered within Kubeflow.

Templates

Starting a project with the right tools and structure can be the difference between success and stagnation. Within Cloudflare, we’ve curated an array of model templates, which are production ready data science repositories with an example model. These model templates are deployed through production to continually ensure they are a stable foundation for future projects. To start a new project, all it takes is one Makefile command to build a new CICD project in the git project of the users’ choosing. These template utility packages are identical to those used in our Jupyter Notebooks and connections to R2 / S3 / GCS buckets, D1 / Postgres / Bigquery / Clickhouse databases. Data scientists can use these templates to instantly kickstart new projects with confidence. These templates are not yet publicly available, but our team plans to open source them in the future.

1. Training Template
Our model training template provides a solid foundation to build any model. This is configured to help extract, transform, and load data (ETL) from any data source. The template includes helper functions for feature engineering, tracking experiments with model metadata, and choose orchestration through a Directed Acyclic Graph (DAG) to productionalize the model pipeline. Each orchestration can be configured to use Airflow or Argo Workflows.

2. Batch Inference Template
Batch and micro-batch inference can make a significant impact on processing efficiency. Our batch inference model template to schedule models for consistent results, and can be configured to use Airflow or Argo Workflows.

3. Stream Inference Template
This template makes it easy for our team to deploy real-time inference. Tailored for Kubernetes as a microservice using FastAPI, this template allows our team to run inference using familiar Python in a container. This microservice already has built-in REST interactive documentation with Swagger and integration with Cloudflare Access authentication tokens in terraform.

4. Explainability Template
Our model template for explainability spins up dashboards to illuminate the model type and experiments. It is important to be able to understand key values such as a time window F1 score, the drift of features and data over time. Tools like Streamlit and Bokeh help to make this possible.

Orchestration

Organizing data science into a consistent pipeline involves a lot of data and several model versions. Enter Directed Acyclic Graphs (DAGs), a robust flow chart orchestration paradigm that weaves together the steps from data to model, and model to inference. There are many unique approaches to running DAG pipelines, but we have found that data science teams’ preference comes first. Each team has different approaches based on their use cases and experience.

Apache Airflow – The Standard DAG Composer
Apache Airflow is the standard as a DAG (Directed Acyclic Graphs)-based orchestration approach. With a vast community and extensive plugin support, Airflow excels in handling diverse workflows. The flexibility to integrate with a multitude of systems and a web-based UI for task monitoring make it a popular choice for orchestrating complex sequences of tasks. Airflow can be used to run any data or machine learning workflow.

Argo Workflows – Kubernetes-native Brilliance
Built for Kubernetes, Argo Workflows embraces the container ecosystem for orchestrating workflows. It boasts an intuitive YAML-based workflow definition and excels in running microservices-based workflows. The integration with Kubernetes enables scalability, reliability, and native container support, making it an excellent fit for organizations deeply rooted in the Kubernetes ecosystem. Argo Workflows can also be used to run any data or machine learning workflow.

Kubeflow Pipelines – A Platform for Workflows
Kubeflow Pipelines is a more specific approach tailored for orchestrating machine learning workflows. “KFP” aims to address the unique demands of data preparation, model training, and deployment in the ML landscape. As an integrated component of the Kubeflow ecosystem, it streamlines ML workflows with a focus on collaboration, reusability, and versioning. Its compatibility with Kubernetes ensures seamless integration and efficient orchestration.

Temporal – The Stateful Workflow Enabler
Temporal takes a stance by emphasizing the orchestration of long-running, stateful workflows. This relative newcomer shines in managing resilient, event-driven applications, preserving workflow state and enabling efficient recovery from failures. The unique selling point lies in its ability to manage complex, stateful workflows, providing a durable and fault-tolerant orchestration solution.

In the orchestration landscape, the choice ultimately boils down to the team and use case. These are all open source projects, so the only limitation is support for different styles of work, which we find is worth the investment.

Hardware

Achieving optimal performance necessitates an understanding of workloads and the underlying use cases in order to provide teams with effective hardware. The goal is to enable data scientists and strike a balance between enablement and utilization. Each workload is different, and it is important to fine tune each use case for the capabilities of GPUs and CPUs to find the perfect tool for the job.  For core datacenter workloads and edge inference, GPUs have leveled up the speed and efficiency that is core to our business. With observability and metrics consumed by Prometheus, metrics enable us to track orchestration to be optimized for performance, maximize hardware utilization, and operate within a Kubernetes-native experience.

Adoption

Adoption is often one of the most challenging steps in the MLops journey. Before jumping into building, it is important to understand the different teams and their approach to data science. At Cloudflare, this process began years ago, when each of the teams started their own machine learning solutions separately. As these solutions evolved, we ran into the common challenge of working across the company to prevent work from becoming isolated from other teams. In addition, there were other teams that had potential for machine learning but did not have data science expertise within their team. This presented an opportunity for MLops to step in — both to help streamline and standardize the ML processes being employed by each team, and to introduce potential new projects to data science teams to start the ideation and discovery process.

When able, we have found the most success when we can help get projects started and shape the pipelines for success. Providing components for shared use such as notebooks, orchestration, data versioning (DVC), feature engineering (Feast), and model versioning (MLflow) allow for teams to collaborate directly.

Looking forward

There is no doubt that data science is evolving our business and the businesses of our customers. We improve our own products with models, and have built AI infrastructure that can help us secure applications and applications built with AI. We can leverage the power of our network to deliver AI for us and our customers. We have partnered with machine learning giants to make it easier for the data science community to deliver real value from data.

The call to action is this: join the Cloudflare community in bringing modern software practices and tools to data science. Be on the lookout for more data science from Cloudflare. Help us securely leverage data to help build a better Internet.

Impressions from Coolest Projects South Africa 2023

Post Syndicated from Rujeko Moyo original https://www.raspberrypi.org/blog/coolest-projects-south-africa-2023/

The day after the successful meetup with our Global Clubs Partner organisations based in Africa, our team and some of our partners enjoyed participating in the Coolest Projects South Africa 2023 event to meet young tech creators and help out as project judges. Here are some of our impressions.

Our team and partners at Coolest Projects South Africa 2023.

A day of Coolest Projects

This is the fourth year of a partner-run, regional version of Coolest Projects — our world-leading showcase for young tech creators — taking place in South Africa, led by David Campey. David is Director of Coder LevelUp, one of our Global Clubs Partners growing and supporting a network of CoderDojos and Code Clubs in the country, and involved in the CoderDojo movement for a whole decade.

A waterbottle with a Coolest Projects South Africa sticker.

There was a buzz of anticipation and excitement at the Cape Town Science Centre as young coders from age 5 to 18 and various backgrounds gathered on this sunny Saturday morning to showcase their coding creations and inventions at Coolest Projects South Africa. From fun games and animations on Scratch, to cool websites created with HTML and CSS, to fantastic Python-based hardware solutions to real-world challenges — every young creator brought along a project they’d created to proudly showcase and celebrate.

Luhle’s language-inspired coding project

While chatting with the creators and discovering what had motivated their projects, we met up with 11-year-old Luhle, who was delighted to take us through the ‘Moon conversation’ animation she had coded in Scratch.

A young tech creator with her Scratch project at Coolest Projects South Africa 2023.
11-year-old Luhle proudly showcases her ‘Moon conversation’ Scratch animation at the Coolest Projects South Africa 2023 event.

The animation involved a Spanish conversation between two people who journeyed to the moon and back. Luhle had created her animation because of her love for languages and in response to a challenge posed to her class by her teacher: to learn 5 languages. While her mother tongue is isiXhosa, she is confident in English, is learning Afrikaans, has started teaching herself Spanish, and would love to learn Korean.

Kayden’s innovative hardware creation

We also met with 16-year-old Kayden, who showcased a project he’d made to address a real-world challenge. He told us he had always struggled to concentrate in class — a challenge that many young people face — and he wanted to build an alternative solution to the established medications. Using vibration sensors and two microcontrollers, he created a digital device to prompt users when they are no longer paying attention in class. With his friend Carl, he successfully tested the device on a meaningful sample of Grade 1–3 learners (ages 7–9).

A young tech creator with his hardware project at Coolest Projects South Africa 2023.
16-year-old Kayden listens intently as one of the Coolest Projects judges, Akwabi Paul from Kenya, commends his invention and advises him on next steps. Listening in are two other judges, Solomon from The Gambia and Sylvester from Malawi.

Kayden is now developing this low-cost innovative solution to include a heart rate monitor to help to detect when a user loses focus, and he wants this to be a solution that’s widely accessible and affordable for all South African children. One of the judges, our partner Akwabi Paul from Tech Kidz Africa in Kenya, was greatly impressed and motivated by Kayden’s work, and took time to advise Kayden on the next steps to turn his invention into a commercial product.

The coding club at CBC St Johns Parklands

During the event we also met members of Mrs Hill’s coding club and learnt about Mrs Hill’s experience of nurturing a love and interest for coding and robotics at CBC St Johns Parklands in Cape Town.

Since 2020, Mrs Hills has been providing coding lessons to all school classes — learners aged 6 to 12 years — as well as an after-school coding and robotics club. She approaches her lessons by introducing and demonstrating coding skills and then presenting her learners with a problem to solve collaboratively. In her words, ‘Learners find more interest in learning practically.’

That’s why Coolest Projects is the perfect fit for her and her young people. 4 of her club members took part in Coolest Projects South Africa 2022. This year, she was proud to enter 11 participants, 3 of whom were chosen as judges’ favourites.

Here’s to the young creators and more Coolest Projects events

After the showcasing and judging, the Coolest Projects South Africa event culminated in a hearty celebration of all that the young tech creators had presented. David Campey’s passion for nurturing coding literacy, digital making skills, and innovative thinking among learners from different walks of life made the whole day a truly enjoyable, inclusive event for the young creators.

Coolest Projects logo.

It was inspiring, no doubt, for our other African partners who participated as judges and are now keen to host Coolest Projects events back in their home countries.  

Get involved in Coolest Projects

If you and your young people based anywhere on the globe feel inspired to showcase digital tech creations, you can get involved in our Coolest Projects 2024 online showcase! It’s free and open to any young tech creator up to age 18.

Sign up to the Coolest Projects newsletter to be the first to hear all updates, for example when showcase registration opens on 14 February.

The post Impressions from Coolest Projects South Africa 2023 appeared first on Raspberry Pi Foundation.

Нагледно какво ще се строи в една част на София

Post Syndicated from Боян Юруков original https://yurukov.net/blog/2023/build-map-sofia/

Застрояването на един район се решава – често в разрез на закона – много преди да видим багерите да изриват детски площадки и градинки или да се вдигат кранове на метри от прозорците. С проекта GovAlert.eu се опитах да помогна с информираността, но тези решения се взимат много преди визите за проектиране и разрешенията за строеж. Истината е, че са скрити в градоустройствени заповеди, протоколи на общинските съвети, продажби на общинска земя, а нерядко – незаконно вписване на такава като частна и фалшифициране на становища и съгласуване. Контрол няма – къде умишлено, къде от некадърност.

Ситуацията в София класически пример за този начин на работа. Едно положително нещо обаче е, че в сайтът на НАГ може да се видят скиците от въпросните градоустройствени планове. Днес между другото седнах да си играя да въведа сградите в и около квартал Дианабад, които не са започнати или довършени заедно с височината им. За някои от тях са издадени визи, за други – разрешителни за строеж. Повечето обаче са одобрени от НАГ за строеж и е само формалност да получат разрешително. Някои одобрените сгради – като тези на 5-тата снимка – се намират на все още общински имоти, което показва, че вече се подготвя продажбата им.

Направих това като експеримент. Реших, че този начин на визуализация би бил полезен на живущите в квартала да си представят какво ги очаква и как ще се промени градската среда в близките години. В червено са въпросните планирани сгради. Останалите се виждат триизмерно и макар очертанията им да не са точни, достатъчно близо са, за да дадат представа. Списъкът не е изчерпателен като може да има няколко по-малки сгради.

Може да видите интерактивна версия тук:

На снимките виждате няколко ключови точки в квартала.

Ето тук ще намерите (почти) всички градоустройствени заповеди от района за последните 10 г. Някои от решенията за застрояване долу са от преди това. Други са укрити от сайта на НАГ.

The post Нагледно какво ще се строи в една част на София first appeared on Блогът на Юруков.

Уча се да уча

Post Syndicated from original https://www.toest.bg/ucha-se-da-ucha/

Уча се да уча

През XXI век най-нормалният въпрос, който може да си зададем, е „Защо трябва да уча каквото и да било, като мога да го намеря за секунди в Google?“ Дали не трябва да обърнем цялата си концепция за ученето и оттук нататък да учим само практически неща, които са ни нужни за живота, работата и хобитата ни, защото цялата останала информация и без това я има на един клик разстояние?

Разбира се, че няма да е адекватно да го направим, но тръгвайки в тази посока, отваряме пътя за въпроса не какво да учим, а как да учим предвид факта, че разполагаме с целия свят в телефона си.

Компютърът в главата ни

Ако извървим пътя на всяка информация, която достига до нас, не само че ще разберем как функционира ученето, но и съвсем логично след това сами ще се сетим как може да бъде подобрен процесът при нас. Всяка секунда до мозъка ни достигат тонове информация. И огромна част изчезва от него след съвсем кратко време. В краткосрочната ни памет остава само това, което може да се „закачи“ за вече съществуващо знание. Но дори и закачилите се късчета данни не оцеляват дълго – след около 20 минути повечето от тях също за забравени. От новопостъпилите факти след час ще помним онова, което е отишло в дългосрочната памет. Този процес можем да направляваме сами при активно учене, стига да знаем как.

Когато ми се налага да обясня на дете какво е ученето, винаги му казвам да си представи невроните в мозъка си като безброй приятели (всъщност са милиони), които живеят там. Те се свързват различно – подават си ръце, пращат си писма, опъват простор един между друг, строят си обща улица и какво ли още не. По всички тези връзки протича нашето знание, защото някакво наше преживяване или нова информация са ги накарали да ги изградят. 

Или иначе казано, сетивните стимули, които получаваме чрез гледане, слушане или четене, стартират дейността на синапсите в мозъка. Информацията се предава от една на друга нервна клетка чрез точките им на свързване. Броят на активните синапси и нервни клетки е определящ за успеха на ученето – колкото повече са те, толкова по-дълбоко в мозъка ни се намира търсената информация. Ако повтаряме чрез преразказване или си припомняме чрез препрочитане дадена информация, ние ѝ помагаме да остане по-дълго и ефективно в паметта ни, защото реактивираме създадените връзки между нервните клетки.

Класическото учене не е складиране на знания в отделни папки и на точно определени места в мозъка ни. По-скоро мозъкът ни разполага с временен склад, в който отива цялата нова информация и който играе ролята на разпределителна гара за пренасочване на информацията. Този склад се нарича хипокампус. Когато си спомняме нещо, не отваряме четвъртата папка от трети рафт на шестата етажерка, а активираме всички нервни клетки и техните взаимовръзки, участвали в запомнянето на точно тази информация. Запомнената от нас информация е плетеницата, която хипокампусът предава на мозъчната кора.

Само че хипокампусът не пуска всичко наведнъж, а предава малко по малко най-важното от деня към главния мозък, предимно през нощта. Докато спим, хипокампусът активира важните според него пътища между нервните клетки, които скрепяват новите взаимовръзки в главния мозък. Това от своя страна е основата на дългосрочната памет. Ето ви научно обосновано оправдание да си полегнете след час-два учене, защото иначе току-що наученото няма да намери пътя до главния мозък.

Дотук е ясно как да запомним нещо наизуст – повтаряме го, докато не стане автоматично. 

Но това означава ли задължително, че го разбираме? 

В училище и в университета пътят на ученето е начертан – имаме учебници, конспекти, планове, класически учебни стаи с учител отпред. Нищо чудно, че все още много учители смятат повторението за единствения начин за запаметяване на информация – „Прочетете урока пет пъти“ или „Напишете всяка непозната дума по три реда“. През стандартното устно или писмено изпитване се преминава изключително лесно, ако просто се наизустят уроците. 

Но не трябва ли знанието да добие още едно изражение – да се превърне в умение? Към това всеки сам намира път. Умението да учиш може да бъде придобито. Дори с не толкова големи усилия или инвестиция на време. И е крайно нужно, защото учениците в голяма степен са изоставени на собствения си усет как да боравят с количеството информация, което ги залива ежедневно в учебния процес. 

Затова и ученето не трябва да е процес на запаметяване на факти, които по-късно мозъкът ни ще „изплюе“. Ученето трябва да е разбиране, изграждане на мисловни модели, с помощта на които да сме в състояние да намерим сами решение. Наученото трябва да ни направи способни да приложим знанието извън рамката му и да го надградим, да ни направи критично мислещи, самостоятелни, комуникативни и търсещи предизвикателството. Пасивното консумиране на предварително зададена информация не може да постигне това. 

Пример как може да се разчупи сухото цитиране на факти, е да се обърне поредността и новият материал да се представи под формата на проблем, който трябва да бъде разрешен. Доказано е, че придобиваме знания най-добре, когато сме изправени пред препятствие, което не можем да преодолеем с наученото досега. Правилният отговор трябва да бъде оставен за накрая. Тогава ефективността (например колко нов материал е взет) ще отстъпи място на любопитството. Крайният резултат ще е всеобхватен: ще сме установили къде сме, ще сме добавили нови знания, но и ще имаме похват, който ще можем да приложим в друга сфера при различни обстоятелства.

Да раздвижим ученето

Учим навсякъде и по всяко време. Учебният процес в учебните заведения е структуриран така, че не предполага свободно да изберем работното си място. В най-добрия случай можем да изберем редицата, в която да седнем. 

На нас всъщност не са ни необходими задължително стол и бюро, за да разбере мозъкът ни, че е време да работи. Напротив, особено при децата е нужно движение и разнообразие вместо специално работно място. Затова когато учат вкъщи, ги оставете да седнат под масата, защо не и във ваната, да стоят прави и да пишат със специален маркер по прозореца, да скачат на батута, да лежат на земята. 

Друга особеност при децата е, че те не обичат да са сами, докато учат. Затова и толкова ги привлича да са около вас във всекидневната или в кухнята с всичките си тетрадки и учебници. Отделете си време, в което сядате заедно да работите: те – по домашните си, а вие – по нещо, което позволява детето да ви прекъсва. 

Работно време

Не е задължително количеството време, което изразходваме за научаването на даден обем информация – например когато учим за изпит, да отговаря на качеството на наученото. Може да прекараме седмици наред в усърдно учене, а накрая оценката да не отразява по никакъв начин усилията ни. В този случай е хубаво да обърнем внимание на целите си – дългосрочни и краткосрочни. „Да науча немски език“ звучи чудесно като желание, но не и като план. Разбиването на целта на по-малки части с междинни успехи, както и предварителна оценка на настоящото ниво и реалистична представа какво и за колко време може да бъде постигнато, биха улеснили неимоверно процеса.

Към работното време спадат и почивките. Не само че не трябва да ги делим от ученето, а следва да обърнем внимание как точно се почива. Не бива нито да се прекалява, нито да ги пестим, защото и в двата случая понижаваме качеството на наученото.

Още дълго може да се изброяват факторите, които влияят върху качеството на ученето. Има и безброй учебни техники, типове учене и хакове за тях, на които е важно да се обърне внимание и които са обект на работа от страна на психолози, учебни терапевти и учители, прозрели нуждата от промяна в учебния процес.

Може би бих поставила в основата им теорията за фиксирания и развиващ се майндсет, или на български език – умствена нагласа.

Ако сте родители на дете в ученическа възраст, сигурно ви е втръснало да чувате от него: „НЕ МОГААА!“

Просто добавете: „Все още.“

Типичен пример за фиксиран майндсет е някой, който не желае дори да се пробва с дадена задача, защото „аз и без това не мога“. Или пък някой, който не може да борави с поражения. Или най-общо – човек, който смята, че потенциалът му е предопределен от способностите му и интелигентността му, които са толкова, колкото са. 

Умствената ни нагласа, за наше щастие, подлежи на промяна. Дали с помощта на учител или родител, или пък със собствени сили, ние можем да развиваме нагласата си постоянно и така да преминем към развиващ се майндсет. Да станем хора, които се учат от грешките си. Които обичат предизвикателствата не само заради състезателния им характер. Които знаят какво да правят с обратната връзка дори когато тя не е много позитивна. И които са наясно, че успехът им зависи от собствените им усилия и нагласи.

Развиващата се умствена нагласа е много повече от която и да било мотивация, защото тя става стил на живот и се прехвърля върху всички области на живота ни.

Мозъкът ни е като мускул. Можем да го тренираме така, че дори малко да боли – като при мускулната треска. Редовното правилно трениране води до натрупване на мускулна маса, или в случая с мозъка ни – до повече взаимовръзки. Не може и не трябва да отписваме традиционното общо образование, колкото и остаряло и неадекватно да се струва на някои от нас. Но задължително трябва да го преустроим – със силна връзка с настоящата реалност и напредък. Познаването на фактите трябва да даде по-голямо предимство на познаването на процесите и взаимовръзките между тях. Защото за суровите факти винаги ще имаме интернет, но за навременното разпознаване и адекватното планиране на процесите, произтичащи от тях, не можем да разчитаме на която и да било търсачка. А ключът към ученето остава вниманието – но вече не само към детайла, а и един към друг.


Светът се променя с бясна скорост. Професиите, в които ще се развиват поколенията, започващи днес образователния си път, все още не са измислени. Подготвена ли е нашата образователна система, за да отговори на тези предизвикателства? Какво може и трябва да се промени? А как?

Веднъж месечно в рубриката „Възможното образование“ ще говорим за промяната – такава, каквато искаме да я видим, за добрите примери и за посоките, в които може би е добре да обърне поглед българската образователна система.

Откъси от Украйна: По-страшно от ракетите

Post Syndicated from original https://www.toest.bg/otkusi-ot-ukrayna-po-strashno-ot-raketite/

<< Към четвърта част

Откъси от Украйна: По-страшно от ракетите

Има едни филми, които започват с нацепени кадри, изскачащи като блицефекти. Чуваш някакво изречение, което спира по средата и оставя многоточия. После второ, трето. Заедно с тях в кадъра се появяват: лице, силует или очи, или гледка, светлини, мъгла, елха, усмивка, нечие действие. Блицефектите извън киното поне при мен идват предизвикани от асоциации или някаква информация, или просто в тишината.

Два месеца след завръщането ми от Украйна все по-често я усещам като блицефект – от забелязани жестове, действия и изречения.

Една вечер в дома на Алла в Украйна приготвяхме вечеря. Белим сварени картофи и тя без всякакъв повод ми казва:

Не знам как ще отгледаме дъщеря си тук.

Често чувам това изречение в моята „блицкомпозиция“ от Украйна. То ми причинява странна болка и ме кара да мисля много извън вече изградената в главата ми връзка война–смърт–ужас.

Изречението ѝ, разбира се, има своето продължение.

Дори и да спечелим войната утре, което е малко вероятно, какво ще се случи с нас? Всичките тези наранени мъже, които се завръщат от фронта огорчени, с разбито здраве, инвалиди, чиито жени и деца са ги напуснали. Какво ще правят те, какво ще работят, кой ще се грижи за тях? Всички тези жени, останали вдовици с по няколко деца на ръце, как ще ги отгледат, как ще преживеят въобще? Какво общество ще имаме? Това е по-страшно от ракетите, с които ни обстрелват сега.

Гледаме се с моята украинска приятелка дълго и мълчим. В очите ѝ няма и следа от ужаса, който виждах навремето в София, докато ми разправяше за разрушените сгради на Киев, за въздушните атаки, за ранения ѝ на фронта брат. Няма и следа от онзи блясък, с който ми казваше: каквото и да ни причиняват, ние ще победим; каквото и да ни коства…

Сега очите ѝ са притихнали в мъгла. Дори когато се смее, там, в очите ѝ, липсва свободата на смеха. Има някакво особено примирение. Предния ден, докато се разхождахме до езерото в града, тя ми каза:

Ако постоянно мислиш за ужаса на войната, за заплахата, за близките ти, които сега са на фронта и по тях стрелят, ще се побъркаш. Няма украинско семейство, в което сред роднините някой да не е на фронта или да не е загинал, или осакатен от войната. Всеки има нужда да си почине от това.

Тогава, край езерото, разбирах тези изречения като мъдрост, философия и част от духа на непримиримостта. Сега, след месеци, нейните думи ме застигат различно. Искала е да ми каже много повече. „Да не се побъркаш“ означава не само да озаптиш страха от това да те удари ракета. Явно за укротяване са много повече мисълта за бъдещето и отчаянието от липсата му.

Ако днес ви помоля да си представите как куче се разхожда в мол, ще се засмеете и сигурно бързо пред очите ви ще изплуват лъскави витрини, жужащи ескалатори, весели хора, които пазаруват за Коледа. Аз лично виждам и кучето си, което се разхожда сред тях. Всъщност две са. Едното е бял къдрав пудел, самодоволен и с огърлица около вратлето. Другото е улично, черничко, със стърчащи къси мустачки, учудени вежди, издължена муцунка и клепнали уши.

Докато си фантазирам тази сцена, веднага си казвам: да, но аз не съм в мола, не виждам наистина това, а само си го представям. Думите „куче в мол“ предизвикаха визуализация, тя – емоция, асоциации, лавина от мисли и може би съпреживяване. Искам ли го? Да, искам го.

Преди дни се обадих по телефона на мой познат журналист, който живее в Днипро. Когато го попитах как е, той не ми каза нищо за себе си, а започна така:

Помня как изглеждаше градът преди войната. Хората се подготвяха за Коледа, всичко беше украсено, светещо. Събуждаше се празничен дух, мислехме за подаръци и за почивка. Имаше настроение, смях по улиците… По време на първата Коледа, след началото на пълномащабната война, улиците бях празни. Никой не излизаше заради страха от постоянните обстрели. За подаръци и такива глезотии въобще не ставаше дума. Бяхме потънали в мрак – буквално, защото руснаците взривиха енергоизточниците ни. Хората умираха от студ, тъй като парното не работеше, пак по същата причина.

Докато Александър ми говори, си спомням как в навечерието на миналата Коледа Алла се прибра с дъщеря си в Украйна окончателно. Тогава в Украйна нямаше ток заради разрушената от руснаците енергийна инфраструктура на страната. Преди да тръгне към дома си, Алла купи десетки светещи пръчки, елхички и всякакви играчки, които денем събират слънчева светлина, за да светят по тъмно. Българските сайтове ги наричат „парти играчки“. Алла ги занесе в дома си в Украйна, защото нямаха възможност да включват генератора постоянно и да го хабят за осветление.

Представям си едноетажната им китна къщичка със затрупана от сняг градинка отпред. Малката ѝ кухня и останалите стаи, които Алла е накичила с „парти играчките“, за да имат някакво осветление в дома, докато навън сирените вият за възможна въздушна атака. Тогава по телефона тя ми каза, че домът им е много уютен така, нищо че навън е тъмно и страшно. Каза ми още за звуците на Украйна по време на коледните празници. Два вида само. На жужащи генератори до всеки дом и болница и на воя на сирени. Нищо друго. Никакъв смях, никакви молове с кучета в тях, никакви подаръци, никакви трапези с по няколко ястия. Само

пълен мрак нощем, вой на сирени и постоянно жужене на генератори.

Александър спира да говори и разбирам, че не съм чула последните му думи, унесена в моите лични спомени. Извинявам се и го моля да повтори.

Единствената ни мисъл през миналата зима беше за пролетта, когато ще можем да възобновим бойните действия, и надеждата, че лятото ще успеем да си върнем загубените територии. В навечерието на тази Коледа хората пак се опитват да върнат някакво коледно настроение. Ресторантите са пълни, навсякъде изглежда, сякаш не воюваме. Тогава се запитах дали това е някаква умора от войната.

Отново ме връхлитат спомени от лятото, когато бях в Украйна. Да, наистина в големите градове ресторантите бяха пълни и тогава се питах как е възможно на няколкостотин километра да има брутална война, в която зверски се избиват и осакатяват хора, и в същото време други хора вечерят спокойно в някой ресторант или се забавляват в бар.

Докато бях в Украйна, си мислех, че така трябва да бъде, че която и да е страна във война не трябва да спира да живее – въпреки ужаса, загубите, тревогите, страха. Защото хората са силата ѝ и ако се скрият по домовете си, ако спрат да се забавляват, ако се откажат да живеят, то това би бил краят. Споделих мислите си с Александър. Седя на няколко хиляди километра от него и сякаш го виждам как ме слуша и поклаща глава.

Да, усещането в градовете е, че уж няма война, но това е на повърхността. Всъщност войната е вътре в нас. Тя е в сирените, в разрушените сгради, в хората, които са загубили домовете си, близките, мъжете си, децата си на фронта. И тези хора имат нужда да се съберат някъде, да споделят притесненията и проблемите си, да знаят, че и на други сред тях се случва същото и че някой е съпричастен. Но друго ме тревожи.

Пак се отнасям в спомените ми с Алла. Когато я видях за първи път, тя ми описваше как небето над Киев е било цялото озарено от пожарите в града, предизвикани от ракетите, с които руснаците го обстрелват. „Но оттук, където няма война, всичко това изглежда нереално“, ми каза тогава.

После, като пристигнали в София, най-много се уплашила, когато другите украинки, с които живеели в общежитието, тръгнали към Полша и тя останала сама с дъщеря си в напълно непозната страна. „Когато пристигнахме с автобуса в България, бяхме повече, можех да си говоря с другите украински жени, децата ни общуваха помежду си. Тоест не бяхме загубили усещането за общност. Сега всяка от тях замина нанякъде и аз останах тук сама. Това е много тежко.“

Гласът на Александър отново долита до мен. Това, което го тревожи в днешна Украйна, е умората от войната и апатията, която вижда в цивилното население.

Хората са останали без надежда. Защото първо си мислеха, че победата ще дойде през пролетта. После имаше надежда за офанзивата през лятото, която трябваше бързо да върне териториите ни, но и това не се случи. Сега отчаянието е навсякъде сред населението ни, защото живеем в някаква неопределеност. Разговарях с жена, в чиято къща преди време падна ракета. Оцеля по чудо. Тогава се страхуваше от войната, от ракетите, които ни засипват и убиват хора. Наскоро мъжът ѝ загина на фронта. Сега жената е сама с децата и мие чинии в едно заведение, защото не може да си намери друга работа, а е с висше образование. Като говорих вчера с нея, тя ми каза: „Все ми е едно какво ще стане, искам само да има какво да ядем с децата и къде да живеем. Не следя новините от фронта.“ Разбираш ли, Николета, хората вече не виждат хоризонт за края на войната. В същото време все по-трудно се намира работа, защото много от заводите ни са разрушени от руснаците. Някои наемат хора на половин ден, но това означава и половин заплата. Като цяло работа няма. Няма и пари. Да, магазините ни са пълни със стока, но какво можем да си купим без пари. Мой приятел се върна ранен от фронта. Оправиха раните му, но психиката му е съсипана. Седи затворен вкъщи и не иска да се среща с никого. Не спи, сънува кошмари – как го убиват, осакатяват или как руснаците го пленяват. Жена му го напусна. Той чака помощите, които държавата му дава, но те не са достатъчни за един млад човек. Безпътица. Няма работа, няма никакъв личен живот. Няма нищо. Какво ще стане с него? Престъпник ли? Отчаян бездомник ли?

Мълча и чувам в слушалката само въздишката на Александър. Опитвам се да си го представя. Къде седи, докато говорим, какво ще сложи на масата си за вечеря? Топло ли е, студено ли е в дома му? Как изглеждат улиците в Днипро на няколкостотин километра от фронта? Има ли там зеещи черни дупки от снаряди по сградите? Ракетите пристигат в Днипро, преди приложението на телефона да реагира. Разрушават домовете и живота на хората, преди да се включат сирените. Опитвам се да усетя отдалеч „коледния дух“ по тези улици, човешката болка и тъга.

Била съм в Украйна, но ми е много по-трудно да си представя всичко това, отколкото да видя във въображението си куче, което се разхожда в мол. Давам си сметка колко далеч сме един от друг с Александър и Украйна. Не като километри, а като преживявания, тревоги и страхове. Мога да бъда съпричастна, мога да се опитвам да помогна, мога да се опитвам да давам кураж на тези, които познавам там. Може би дори ще успея, донякъде.

Но какво става с всички милиони украинци днес, дни преди Коледа. От какво имат нужда те сега?

Гласът на Александър е мек, тих, спокоен.

Надяваме се на някакво чудо, но откъде би дошло то? Помощта отвън не е толкова голяма вече и ще става все по-малка. Явно е, че чудото няма да се случи. Кой би го сътворил? Сега хората мислят единствено как да оцелеят без работа, без дом и със загубите на своите близки на фронта. Задава се хуманитарна криза на много нива. Но коледни дни са, може би все пак чудото ще стане.

С Алла се чуваме, както обикновено, през уикенда. В този момент телефонът ми започва да вибрира по познатия начин. Тя пита какво е това, Казвам ѝ, че не съм махнала още от телефона си приложението за въздушни атаки. Тя прави пауза.

Защо си причиняваш това? Аз моето го махнах. Все едно е дали знам за ракетите, или не. Имаме толкова други проблеми да решим.

[$] A schism in the OpenPGP world

Post Syndicated from jake original https://lwn.net/Articles/953797/

The OpenPGP standard for email
encryption has been around since 1997, when it was derived from the
venerable Pretty Good
Privacy
(PGP) program that was released in 1991. Since it came about,
OpenPGP has been the decentralized, interoperable way to exchange encrypted
email, though
its use never really took off as advocates hoped. Now, though, it
would seem that a split in the OpenPGP community threatens to
fragment the OpenPGP-encrypted-email landscape, potentially leading to
interoperability woes.

AMD Instinct MI300X GPU and MI300A APUs Launched for AI Era

Post Syndicated from Patrick Kennedy original https://www.servethehome.com/amd-instinct-mi300x-gpu-and-mi300a-apus-launched-for-ai-era/

We delve into the new AMD Instinct MI300X GPU, MI300A APU, and see how AMD has built packages to go head-to-head with the NVIDIA H100 and win

The post AMD Instinct MI300X GPU and MI300A APUs Launched for AI Era appeared first on ServeTheHome.

Security Analysis of a Thirteenth-Century Venetian Election Protocol

Post Syndicated from Bruce Schneier original https://www.schneier.com/blog/archives/2023/12/security-analysis-of-a-thirteenth-century-venetian-election-protocol.html

Interesting analysis:

This paper discusses the protocol used for electing the Doge of Venice between 1268 and the end of the Republic in 1797. We will show that it has some useful properties that in addition to being interesting in themselves, also suggest that its fundamental design principle is worth investigating for application to leader election protocols in computer science. For example, it gives some opportunities to minorities while ensuring that more popular candidates are more likely to win, and offers some resistance to corruption of voters.

The most obvious feature of this protocol is that it is complicated and would have taken a long time to carry out. We will also advance a hypothesis as to why it is so complicated, and describe a simplified protocol with very similar properties.

And the conclusion:

Schneier has used the phrase “security theatre” to describe public actions which do not increase security, but which are designed to make the public think that the organization carrying out the actions is taking security seriously. (He describes some examples of this in response to the 9/11 suicide attacks.) This phrase is usually used pejoratively. However, security theatre has positive aspects too, provided that it is not used as a substitute for actions that would actually improve security. In the context of the election of the Doge, the complexity of the protocol had the effect that all the oligarchs took part in a long, involved ritual in which they demonstrated individually and collectively to each other that they took seriously their responsibility to try to elect a Doge who would act for the good of Venice, and also that they would submit to the rule of the Doge after he was elected. This demonstration was particularly important given the disastrous consequences in other Mediaeval Italian city states of unsuitable rulers or civil strife between different aristocratic factions.

It would have served, too, as commercial brand-building for Venice, reassuring the oligarchs’ customers and trading partners that the city was likely to remain stable and business-friendly. After the election, the security theatre continued for several days of elaborate processions and parties. There is also some evidence of security theatre outside the election period. A 16th century engraving by Mateo Pagan depicting the lavish parade which took place in Venice each year on Palm Sunday shows the balotino in the parade, in a prominent position—next to the Grand Chancellor—and dressed in what appears to be a special costume.

I like that this paper has been accepted at a cybersecurity conference.

And, for the record, I have written about the positive aspects of security theater.

„Няма хора“ за ИТ в държавната администрация?

Post Syndicated from Bozho original https://blog.bozho.net/blog/4176

На последното заседание на комисията по електронно управление беше повдигнат въпроса за кадровото осигуряване в администрацията във връзка с информационните технологии и електронното управление.

Това е сериозен дългосрочен проблем, който има нужда от стратегическо решение. Да, държавата аутсорсва ИТ дейности, но дори управлението на аутсорсинга изисква вътрешен капацитет. Още повече, че има стратегически функции, които държавата трябва да може да обезпечи сама.

В тази посока направихме две първи стъпки преди година и нещо: да дадем възможност за заплати с над 80% спрямо нормата за администрацията за определени категории ИТ специалисти и да започнем централизирането на т.нар. service desk услуги в изпълнителната агенция към МЕУ.

Но трябва много по-широк обхват на реформата. Имам разписана базова концепция, която стъпва на принципа на „споделените услуги“ и разделя тези услуги на пет групи:
Разработка на софтуер, инфраструктура (мрежи и хардуер), системна администрация и интеграция, мрежова и информационна сигурност, service desk.

Разпокъсаността на експертите по различните структури в държавата не е ефективна и трябва да се премине към консолидация и споделени услуги. Това обаче трябва да се претегли спрямо секторната експертиза, която се изисква в някои администрации.

Такъв подход ще позволи не просто по-високи заплати, а създаване на екипи и структури, които могат да привличат повече хора, да гарантират кариерно развитие. Иначе казано – да не са типична администрация, а ИТ организации, с мислене и начин на работа на ИТ организация.

В следващите месеци ще обсъждам и развивам тази концепция, докато тя стигне до своето законодателно изражение. Защото без да създадем подходяща институционална среда, ще продължаваме да си говорим, че „няма хора“.

Материалът „Няма хора“ за ИТ в държавната администрация? е публикуван за пръв път на БЛОГодаря.

SLAM: a new Spectre technique

Post Syndicated from corbet original https://lwn.net/Articles/953880/

Many processor vendors provide a mechanism to allow some bits of a pointer
value to be used to store unrelated data; these include Intel’s linear address masking (LAM), AMD’s upper address ignore, and Arm’s top-byte
ignore
. A set of researchers has now come up with a way (that
they call “SLAM”) to use those features to bypass many checks on pointer
validity, opening up a new set of Spectre attacks.

In response to SLAM, Intel made plans to provide software guidance
prior to the future release of Intel processors which support LAM
(e.g., deploying LAM jointly with LASS). Linux engineers developed
patches to disable LAM by default until further guidance is
available. ARM published an advisory to provide guidance on future
TBI-enabled CPUs. AMD did not implement guidance updates and
pointed to existing Spectre v2 mitigations to address the SLAM
exploit described in the paper.

See the full
paper
for the details.

How we’re experimenting with LLMs to evolve GitHub Copilot

Post Syndicated from Sara Verdi original https://github.blog/2023-12-06-how-were-experimenting-with-llms-to-evolve-github-copilot/

Earlier this year, it seemed like every headline or dinner conversation was earmarked by the buzzwords “generative AI.” And while 2023 has been a benchmark year for the adoption of generative AI, it’s not entirely a new technology. Arguably, AI has been around since the ‘60s, but the AI as we know it today came to be with the invention of machine learning frameworks known as neural networks (you can read more about that here).

For the past few years at GitHub, we’ve been experimenting with generative AI models to create new, meaningful tools for developers—which is how GitHub Copilot was born. And since GitHub Copilot’s initial preview release in 2021, we’ve been thinking a lot about how generative AI can (and should) empower developers to be more productive at every stage of the software development lifecycle. That led us to our vision for the future of AI-powered software development with GitHub Copilot, which we covered in detail this year at GitHub Universe 2023.

In this blog post, we’ll explore some of the experiments we’ve conducted with generative AI models over the past few years, as well as take a behind-the-scenes look at some of our key learnings. We’ll also explore what going from a concept to a product looks like with a radically new technology.

Key pillars of experimentation with AI at GitHub

As developers increasingly use AI tools to improve overall productivity, we have four key pillars at GitHub that are guiding our work and how we experiment with AI. We want a developer’s AI experience to be:

  • Predictable. We want to create tools that guide developers towards their end goals but don’t suprise or overwhelm them.
  • Tolerable. As we’ve seen, AI models can be wrong. Users should be able to spot incorrect suggestions easily, and address them at a low cost to focus and productivity.
  • Steerable. When a response isn’t right or isn’t what a user is looking for, they should be able to steer the AI towards a solution. Otherwise, we’re optimistically banking on the models producing perfect answers.
  • Verifiable. Solutions must be easy to evaluate. The models are not perfect, but they can be very helpful tools if users verify their outputs.

Now that we have a baseline understanding of how we prioritize experimenting with AI, let’s take a look at the events that led to the conception of the latest evolution of GitHub Copilot.

Before GitHub Copilot’s evolution came GPT-4

Last year, researchers from GitHub Next, our R&D department focused on the future of software development, were given advanced access to OpenAI’s large language model (LLM) that would soon be released as GPT-4.

“At the time, no one had seen anything like this,” Idan Gazit, senior director of research for GitHub Next recalls. “It became a race to discover what the new models are capable of doing and what kinds of applications are possible tomorrow that were impossible yesterday.”

So, the GitHub Next team did what they do best: experiment. Over the course of several months, researchers from GitHub Next used the GPT-4 model to develop potential new tools and features that could be used across the GitHub platform. Once the team identified the projects that showed true value, the sprint to build began.

“In classic GitHub Next fashion, we sat down and spiked a bunch of ideas and saw what looked promising or exciting to us,” Gazit explains. “And then we doubled down on the things that we believed would bear fruit.”

In the time between receiving the model and the slated announcement of the model’s release in March 2023, the team had come up with several concepts and technical previews.

At the time, no one had seen anything like this. It became a race to discover what the new models are capable of doing and what kinds of applications are possible tomorrow that were impossible yesterday.

– Idan Gazit, Senior Director of Research // GitHub Next

As these projects came together, senior leadership at GitHub began to think about what these meant for the future of GitHub Copilot. Mario Rodriguez, VP of product management, says, “We knew we wanted to make an announcement of our own around the joint Microsoft and OpenAI announcement of GPT-4. At that time, GitHub Next had a set of investments that they were making that they thought were worthwhile for the announcement. Those investments were not production-ready—they were more future-focused.” He explains, “But that got us thinking, so we put pen to paper and came up with the ambition behind the latest evolution of GitHub Copilot.”

Thinking ahead 🤔

As teams at GitHub thought about evolving GitHub Copilot beyond a pair programmer in the IDE, they imagined a future where GitHub Copilot was:

  • Ubiquitous across every tool that developers use and integrated into every task that developers perform.
  • Conversational by default, so that natural language can be used to achieve anything.
  • Personalized to the context and knowledge of the individual, project, team, and community.

This thought exercise, in conjunction with GitHub Next’s work to conceptualize and create new tools that could revolutionize the developer workflow, crystallized what would make up the latest evolution of GitHub Copilot. And on March 22, 2023, the technical preview for what GitHub Copilot would evolve into was released to the world with GitHub Copilot Chat and the following technical previews created by GitHub Next:

So, what happened behind the scenes to come up with these previews? Let’s find out.

Experimenting with AI’s place in the developer experience

If you asked just about any developer what’s something that is specifically unique to GitHub, it would be pretty shocking if they didn’t say “pull requests.” Pull requests play a central role in the GitHub developer experience—they’re not only a point of collaboration, but a gateway for teams to view and approve any changes to code.

So when Andrew Rice, Don Syme, Devon Rifkin, Matt Rothenberg, Max Schaefer, Albert Ziegler, and Aqeel Siddiqui were given the GPT-4 model, they were tasked with the challenge of finding ways to incorporate AI into GitHub.com.

“GitHub invented pull requests, so we started thinking, how could we add AI smarts around pull requests?” Rice says. “We tried a bunch of stuff—we prototyped automatic code suggestions for reviews, we had a sort of summarize mode, and a bunch of other things around test generation.” But as the deadline of March 22 approached, a few of these prototyped features weren’t working as desired, so Rice and team began focusing their attention and efforts solely on the summary feature.

With the early version of Copilot for Pull Requests, a developer could submit their pull request and the AI model would generate a description and walkthrough of the code in the first comment to provide important context for the reviewer.

“We did an internal study of the feature with Hubbers and it didn’t go well,” Rice laughs. It wasn’t that the developers didn’t like what the feature was trying to achieve, it was the user experience, Rice believes, they were having challenges with. “The developers were concerned that the AI would be wrong. But there’s two things: you have the content the AI generates and then you have the way that it’s presented to the user and how it interacts with the workflow. At first, we focused a lot on the first bit, the AI-generated content, but it turned out that the second bit was far more crucial in getting this thing to fly,” he explains.

To work around this, Rice and team decided to pivot and use the same AI-generated content but frame it differently. “Instead of a comment, we put it as a suggestion to the developer that let them get a preview of what the description of their pull request could look like that they could then edit,” Rice says. “So, we moved it to a suggestion system, and all of a sudden the feedback changed to ‘wow, these are helpful suggestions.’ The content was exactly the same as before, it was just presented differently.”

Nobody’s perfect—not even AI

For Rice, the key takeaway during this process was the importance of how the AI output is presented to the developer, rather than the total accuracy of the suggestion. That doesn’t mean that it’s acceptable for the AI to be completely wrong, but it does mean that a developer’s demand for the quality of the suggestion sits on a spectrum—developers will view something as it fits within their workflow regardless of what is served to them. When the content was served as a suggestion that the developer had the authority to accept and edit, the typical attitude toward the feature changed.

Eddie Aftandilian, a principal researcher that headed up the development of another GitHub Copilot feature, shared some similar sentiments and takeaways throughout the process of building Copilot for Docs. In late 2022, Aftandilian and Johan Rosenkilde were examining embeddings and retrievals, and they prototyped a vector database for a different GitHub Copilot experiment. “This got us thinking, what if we could use this for retrievals of things other than just code,” Aftandilian remembers. “Once we got access to GPT-4, we realized we could use the retrieval engine to search a large corpus of documentation, and then compose those search results into a prompt that elicits better, more topical answers based on the documentation,” he explains.

“Since GitHub is all about developer tools, we thought, how can we make this into a useful developer tool?” Aftandilian says. Developers spend an enormous amount of time poring over docs to find solutions—and as Aftandilian plainly puts it, “No one really likes reading documentation!” He continues, “It also can be hard to get the right answer out of docs, too. So, it seemed like there was an opportunity here for something that could answer a developer’s question more directly and unblock them. It’s also an area of the development process that we felt was underexplored. We spend a lot of time searching around for answers, which can be a real pain point, and we thought we could do better with these new LLMs.”

Aftandilian, along with Devon Rifkin, Jake Donham, and Amelia Wattenberger, also deployed their early version of Copilot for Docs to Hubbers, extending GitHub Copilot’s reach to GitHub’s internal docs in addition to public documentation. But once the preview reached public testing, he got some interesting feedback about the quality of the AI outputs.

“One challenge we came across during the development process was that the models don’t always give the right answer or the right document,” Aftandilian says. “To address this, we built in the capability for our answers to provide references or links to other documentation. We found that when we deployed it, the feedback we received was that developers didn’t mind if the output wasn’t always perfectly correct if the linked references made it easier to evaluate what the AI produced. They were using Copilot for Docs as a search engine,” he says.

The UX needs to be tolerant of AI’s mistakes—you can’t assume that the AI will always be right.

– Eddie Aftandilian, Principal Researcher // GitHub Next

Another key learning for Aftandilian was that human feedback is the true gold standard for developing AI-based tools. “One of our conclusions was that you should ship something sooner rather than later to get real, human feedback to drive improvements,” he says.

And similar to Rice’s earlier point, user experience is also critical to the success of these AI-powered tools. “The UX needs to be tolerant of AI’s mistakes—you can’t assume that the AI will always be right,” Aftandilian says. “Initially we were focused on getting everything right, but we soon learned that the chat-like modality of Copilot for Docs makes the answers feel less authoritative and folks are more tolerant of the responses when they point the user in the right direction. The AI isn’t always perfect, but it’s a great start.”

Small but mighty

In October 2022, the entire GitHub Next team met up in Oxford, England to get together and discuss all of the projects that they were currently working on, as well as some exciting—and maybe even far-fetched—ideas.

“One of the things that I pitched at this crazy ideas session was a project that would use LLMs to help you figure out CLI commands,” Johan Rosenkilde, a principal researcher for GitHub Next, recalls. “I was thinking about something that could use natural language prompts to describe what you wanted to do in the command line, then some sort of GUI or interface pops up that helps you narrow down what you want to do.”

As Rosenkilde talked through his pitch, one of his colleagues, Matt Rothenberg, began writing an application that did almost exactly that. “By the time my talk ended, he asked if he could show me something, and my mind was just blown,” Rosenkilde laughs. That thirty-minute prototype was the genesis for what would become Copilot for CLI.

“What he had created clearly showed that there was something of value here, but it lacked maturity of course,” Rosenkilde says. “And so what we did was carve out time to refine this rough demo into something that we could deliver to developers,” he says. By the time March 2023 rolled around, they had a preview that brought the power of GitHub Copilot right to the CLI for developers to quickly ask for and receive their desired shell commands, including a breakdown that explains each part of the command—without ever needing to search the web for answers.

When reflecting on the process of taking this app from that original, scrappy version to a technical preview, Rosenkilde echoes Rice and Aftandilian in his appreciation for the subtlety of UX decisions.

“I’m a backend person: I’m heavy on theory and I like really difficult problems that cause me to think for weeks about a solution,” Rosenkilde says. “Matt was the UX guy, and he iterated extremely quickly through a lot of options. So much of the success of this application hinged on the UX, and that’s a lesson that I’ve taken with me. All that we do in GitHub Next, in the end, is think up tools that will add value to the user experience, so it’s crucial that we get the design right and that it fits in with what the AI model can do. As we know, the AI models aren’t perfect, but when they are imperfect, the cost to the user should be as low as possible,” Rosenkilde says.

That simple fact is what informs the explanation field that can be found in Copilot for CLI. “This actually wasn’t part of the original UI. As the product matured, we came up with the explanation field, but we had some difficulty with the LLM producing the structured type of explanations we sought. It’s very unnatural for a language model to produce something that looks like this, I had to hit it with a very large hammer,” he jokes. “We wanted it to be clearly structured, but if you just ask the AI to explain a shell command, it would feed you a long paragraph that is not readily scannable and might not include the details you want.”

Example of the explanation field in Copilot for CLI

Rosenkilde also felt that it was important to add the explanation field to help developers learn about shell scripts and double check that they have received the correct command. “It’s also a security feature because you can read in natural language whether the command will change files you didn’t expect to change,” he explains. This multifaceted explanation field is not only useful, it’s a testament to the UX of the application. “When you have such a small application, you want every feature to have multiple different uses so that you can package up a lot of complexity in something that visually is very simple.”

Where we’re headed 🚀

We’re focused on something great here: creating delightful AI experiences for everyone who interacts with the GitHub platform. And while we’re working on it, we invite you to be part of the process. You can get involved by joining the waitlists for our current previews and giving us your honest feedback on what you think and what you want to see going forward.

And if you’re not already using GitHub Copilot, give it a try with a free, 30-day trial for individual developers.

The post How we’re experimenting with LLMs to evolve GitHub Copilot appeared first on The GitHub Blog.

Security updates for Wednesday

Post Syndicated from corbet original https://lwn.net/Articles/953861/

Security updates have been issued by Fedora (chromium, clevis-pin-tpm2, firefox, keyring-ima-signer, libkrun, perl, perl-PAR-Packer, polymake, poppler, rust-bodhi-cli, rust-coreos-installer, rust-fedora-update-feedback, rust-gst-plugin-reqwest, rust-pore, rust-rpm-sequoia, rust-sequoia-octopus-librnp, rust-sequoia-policy-config, rust-sequoia-sq, rust-sequoia-wot, rust-sevctl, rust-snphost, and rust-tealdeer), Mageia (samba), Red Hat (postgresql:12), SUSE (haproxy and kernel-firmware), and Ubuntu (haproxy, linux, linux-aws, linux-aws-6.2, linux-azure, linux-azure-6.2,
linux-azure-fde-6.2, linux-lowlatency, linux-oracle, linux-raspi,
linux-starfive, linux, linux-aws, linux-kvm, linux-lts-xenial, linux-oem-6.1, and redis).

How we used OpenBMC to support AI inference on GPUs around the world

Post Syndicated from Ryan Chow original http://blog.cloudflare.com/how-we-used-openbmc-to-support-ai-inference-on-gpus-around-the-world/


Cloudflare recently announced Workers AI, giving developers the ability to run serverless GPU-powered AI inference on Cloudflare’s global network. One key area of focus in enabling this across our network was updating our Baseboard Management Controllers (BMCs). The BMC is an embedded microprocessor that sits on most servers and is responsible for remote power management, sensors, serial console, and other features such as virtual media.

To efficiently manage our BMCs, Cloudflare leverages OpenBMC, an open-source firmware stack from the Open Compute Project (OCP). For Cloudflare, OpenBMC provides transparent, auditable firmware. Below describes some of what Cloudflare has been able to do so far with OpenBMC with respect to our GPU-equipped servers.

Ouch! That’s HOT!

For this project, we needed a way to adjust our BMC firmware to accommodate new GPUs, while maintaining the operational efficiency with respect to thermals and power consumption. OpenBMC was a powerful tool in meeting this objective.

OpenBMC allows us to change the hardware of our existing servers without the dependency of our Original Design Manufacturers (ODMs), consequently allowing our product teams to get started on products quickly. To physically support this effort, our servers need to be able to supply enough power and keep the GPU and the rest of the chassis within operating temperatures. Our servers had power supplies that had sufficient power to support new GPUs as well as the rest of the server’s chassis, so we were primarily concerned with ensuring they had sufficient cooling.

With OpenBMC, our first approach to enabling our product teams to start working with the GPUs was to simply blast fans directly in line with the GPU, assuming the GPU was running at Thermal Design Power (TDP, the maximum heat from a given source). Unfortunately, because of the heat given off by these new GPUs, we could not keep them below 95˚C when they were fully stressed. This prompted us to install another fan to help keep the GPU cool and helped us bring a fully stressed GPU down to 65˚C. This served as our baseline before we began the process of fine-tuning the fan Peripheral Integral Derivative (PID) controller to handle variation in temperature in a more nuanced manner. Below shows a graph of the baseline described above:

With this baseline in place, tuning becomes a tedious iteration of PID constants. For those unfamiliar with PID controllers, we use the following equation to describe the control output given the error as input.

To break this down, u(t) represents our control output, e(t) is the error signal, and Kp, Ki, and Kd are the proportional gain, integral gain, and derivative gain constants, respectively. To briefly describe how each of these components work, I will isolate each of the components. Our error, or e(t), is simply the difference between the target temperature and the current temperature, so if our target temperature is 50 ˚C and my current is 60 ˚C, the e(t) for the proportional component is 10 ˚C. If u(t) = Kp⋅e(t), we can see that u(t) is = Kp⋅10. Any given Kp could drastically affect the control output u(t) and is responsible for how quickly the controller adjusts to approaching the target. The Ki⋅∫e(t)dt accumulates the error over time. The scenario where the controller reaches steady state but does not hit the target setpoint is called steady-state error. The integral component accumulating that error is intended for resolving this scenario but can also cause oscillations if the integral gain is too large. Lastly, the derivative portion, Kd⋅∂e(t)/∂t, can be seen as Kd⋅(the slope at the given point in time). You can imagine that the more quickly the controller approaches the target, the greater the slope, and the slower the approach, the less slope. Another way to look at it is that with faster oscillations, the greater the derivative portion, and slower oscillations, the lesser the derivative portion.

With this in mind, the following points are taken into consideration when we manually tune the controller:

  1. Avoid oscillations at the target setpoint, i.e. avoid letting the temperature fluctuate above or below the specified temperature. Oscillations — specifically variations of fan speed and pulse width modulation (generally the power supplied to the fan), increase mechanical wear on components. We want these servers to last the entire five-year lifecycle while also not costing us capital expenses for replacing components or operating expenses in terms of the electricity we expend.
  2. Approach the target setpoint as quickly as possible — with the above graph, we see the temperature settle somewhere between 63 ˚C and 65 ˚C quickly, but that’s because the fans are currently at 100% load. Settling at the target setpoint quickly means our fans are able to quickly adjust to the heat expended by the GPU or any component.
  3. The proportional gain affects how quickly the controller approaches the setpoints
  4. The integral gain is used to remove steady-state errors.
  5. The derivative gain is based of the rate of change and is used to remove oscillations

With a better understanding of the PID controller theory, we can see how we can iterate toward our final product. Our initial trial from a full load fan had some difficulties finding the setpoints, as shown by the oscillations on the left side of the graph. As we learned above, by adjusting our integral and derivative gains we were able to help reduce the oscillations. We can see the controller trying to lock in around the 70C, but our intended target was 65 ˚C (if it were to lock in at 70 ˚C, this would be a clear example of steady-state error). The last point we worked to resolve was to improve the speed at which it approaches the setpoint, which we were able to tune with by adjusting proportional gain.

OpenBMC fan configurations are easily configurable JSON files to manually tune PID settings. The graphs presented come from comma-separated-value (CSV) files generated from OpenBMC’s PID controller application and allow us to easily iterate and improve our configuration. Several iterations later, we got our final product. We had a tad bit of overshoot in the beginning, but this is a strong enough result for us to leave the PID controller for now.

Talk to me GPU

In order to source the temperature data for the PID tuning above, we had to establish communication with the GPU. The first thing we did was identify the route from the BMC to the GPU and Peripheral Component Interconnect Express (PCIe) slot. Looking at our ODM’s schematics for the BMC and motherboard, we found a System Management Bus (SMBus) line to a mux or switch connecting to the PCIe slot. For embedded developers out there, the SMBus protocol is similar to Inter-Integrated Circuit (I2C) bus protocol, with minor differences in electrical and clock speed requirements. With a physical path to communication established, we next needed to communicate with the GPU in software.

OpenBMC applications, Linux kernel drivers, and the software tools we can add for development make the configuration and operation of devices such as fans, analog-to-digital converters (ADC), and power supplies as simple as possible. The first thing we try as a test is to get some temperature sensor data from the GPU’s onboard temperature sensor and inventory information from the Electrically-Erasable Programmable Read-Only Memory (EEPROM). We can verify the temperature sensor data with tooling provided by our GPU vendor, and the inventory information can be verified against the asset sheet provided to us when the device was delivered. Building the eerpog tool, we can try communicating with the eeprom:

~$ eeprog -f -16 /dev/i2c-23 0x50 -r 0x00:200
eeprog 0.7.5, a 24Cxx EEPROM reader/writer
Copyright (c) 2003 by Stefano Barbato - All rights reserved.
  Bus: /dev/i2c-23, Address: 0x50, Mode: 16bit
  Reading 200 bytes from 0x0
<redacted> Ver 0.02

This tool will produce block read requests over SMBus and dump the returned information. For temperature, the TMP75 temperature sensor is commonly used for many temperature sensors in server commodity components. We can manually bind the temperature sensor in sysfs like this:

~$echo "tmp75 0x4F > /sys/bus/i2c/devices/i2c-23/new_device"

This will bind the tmp75 driver to address 0x4F on I2C bus 23, and we can verify the successful binding and sysfs information as seen below:

~$ cat /sys/bus/i2c/devices/i2c-23/23-004f/name tmp75

With our temperature sensor and inventory information, we can now leverage OpenBMC’s applications for simple configuration to make this information available via the Intelligent Platform Management Interface (IPMI) or Redfish, a REST based protocol for communicating with the BMC. For adding these components, we will focus on Entity-Manager.

Entity-Manager is OpenBMC’s means of making physical components available to the BMC’s software via JSON configuration files. OpenBMC applications refer to information made available with these configurations to make sensor data and inventory data available over BMC interfaces and raise alerts when going out of bounds of critically configured settings. The following is the configuration we use as a result of our discoveries above:

{
    "Exposes": [
        {
            "Address": "0x4F",
            "Bus": "23",
            "Name": "GPU_TEMP",
            "Thresholds": [
                {
                    "Direction": "greater than",
                    "Name": "upper critical",
                    "Severity": 1,
                    "Value": 92
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 30
                }
            ],
            "Type": "TMP75"
        }
    ],
    "Name": "****************",
    "Probe": "xyz.openbmc_project.FruDevice({'BOARD_PRODUCT_NAME': *********})",
    "Type": "NVMe",
    "xyz.openbmc_project.Inventory.Decorator.Asset": {
        "Manufacturer": "$BOARD_MANUFACTURER",
        "Model": "$BOARD_PRODUCT_NAME",
        "PartNumber": "$BOARD_PART_NUMBER",
        "SerialNumber": "$BOARD_SERIAL_NUMBER"
    }
}

Entity-Manager probes the I2C buses for all the EEPROMs for inventory information, possibly detailing what’s available on the buses. It will then try to match the information with a given JSON configuration’s “Probe” member, and if there is a match, it will take the configuration and configure the configurations as part of what is exposed. The end result is the FRU and GPU_TEMP available on IPMI.

$~ ipmi 517m206 sdr |grep GPU_TEMP
GPU_TEMP         | 39 degrees C      | ok
$~ ipmi 517m206 fru print 151
FRU Device Description : <redacted> (ID 151)
 Board Mfg Date        : Mon Mar 27 18:13:00 2023 UTC
 Board Mfg             : <redacted>
 Board Product         : <redacted>
 Board Serial          : <redacted>
 Board Part Number     : <redacted>

Open-Source firmware moving forward

Cloudflare has been able to leverage OpenBMC to gain more control and flexibility with our server configurations, without sacrificing the efficiency at the core of our network. While we continue to work closely with our ODM partners, our ongoing GPU deployment has underscored the importance of being able to modify server firmware without being locked to traditional device update cycles.
For those who are interested in considering making the jump to open-source firmware, check out OpenBMC here!

The collective thoughts of the interwebz