Getting AWS Certified can help you propel your career, whether you’re looking to find a new role, showcase your skills to take on a new project, or become your team’s go-to expert. And because AWS Certification exams are created by experts in the relevant role or technical area, preparing for one of these exams helps you build the required skills identified by skilled practitioners in the field.
Reading the FAQ page of the AWS services relevant for your certification exam is important in order to acquire a deeper understanding of the service. However, this could take quite some time. Reading FAQs of even one service can take half a day to read and understand. For example, the Amazon SageMaker FAQ contains about 33 pages (printed) of content just on SageMaker.
Wouldn’t it be an easier and more fun learning experience if you could use a system to test yourself on the AWS service FAQ pages? Actually, you can develop such a system using state-of-the-art language models and a few lines of Python.
In this post, we present a comprehensive guide of deploying a multiple-choice quiz solution for the FAQ pages of any AWS service, based on the AI21 Jurassic-2 Jumbo Instruct foundation model on Amazon SageMaker Jumpstart.
Modele mari de limbaj
In recent years, language models have seen a huge surge in size and popularity. In 2018, BERT-large made its debut with its 340 million parameters and innovative transformer architecture, setting the benchmark for performance on NLP tasks. In a few short years, the state-of-the-art in terms of model size has ballooned by over 500 times; OpenAI’s GPT-3 and Bloom 176 B, both with 175 billion parameters, and AI21 Jurassic-2 Jumbo Instruct with 178 billion parameters are just three examples of large language models (LLMs) raising the bar on natural language processing (NLP) accuracy.
Modele de fond de ten SageMaker
SageMaker provides a range of models from popular model hubs including Hugging Face, PyTorch Hub, and TensorFlow Hub, and propriety ones from AI21, Cohere, and LightOn, which you can access within your machine learning (ML) development workflow in SageMaker. Recent advances in ML have given rise to a new class of models known as modele de fundație, which have billions of parameters and are trained on massive amounts of data. Those foundation models can be adapted to a wide range of use cases, such as text summarization, generating digital art, and language translation. Because these models can be expensive to train, customers want to use existing pre-trained foundation models and fine-tune them as needed, rather than train these models themselves. SageMaker provides a curated list of models that you can choose from on the SageMaker console.
With JumpStart, you can find foundation models from different providers, enabling you to get started with foundation models quickly. You can review model characteristics and usage terms, and try out these models using a test UI widget. When you’re ready to use a foundation model at scale, you can do so easily without leaving SageMaker by using pre-built notebooks from model providers. Your data, whether used for evaluating or using the model at scale, is never shared with third parties because the models are hosted and deployed on AWS.
AI21 Jurassic-2 Jumbo Instruct
Jurassic-2 Jumbo Instruct is an LLM by AI21 Labs that can be applied to any language comprehension or generation task. It’s optimized to follow natural language instructions and context, so there is no need to provide it with any examples. The endpoint comes pre-loaded with the model and ready to serve queries via an easy-to-use API and Python SDK, so you can hit the ground running. Jurassic-2 Jumbo Instruct is a top performer at HELM, particularly in tasks related to reading and writing.
Prezentare generală a soluțiilor
In the following sections, we go through the steps to test the Jurassic-2 Jumbo instruct model in SageMaker:
- Choose the Jurassic-2 Jumbo instruct model on the SageMaker console.
- Evaluate the model using the playground.
- Utilizați un blocnotes asociat cu modelul de fundație pentru a-l implementa în mediul dvs.
Access Jurassic-2 Jumbo Instruct through the SageMaker console
The first step is to log in to the SageMaker console. Under pornire în panoul de navigare, alegeți Modele de fundație to request access to the model list.
After your account is allow listed, you can see a list of models on this page and search for the Jurassic-2 Jumbo Instruct model.
Evaluate the Jurassic-2 Jumbo Instruct model in the model playground
On the AI21 Jurassic-2 Jumbo Instruct listing, choose Vezi model. Veți vedea o descriere a modelului și a sarcinilor pe care le puteți efectua. Citiți EULA pentru model înainte de a continua.
Let’s first try out the model to generate a test based on the SageMaker FAQ page. Navigate to the Teren de joacă tab.
Pe Teren de joacă tab, you can provide sample prompts to the Jurassic-2 Jumbo Instruct model and view the output.
Note that you can use a maximum of 500 tokens. We set the Max length to 500, which is the maximum number of tokens to generate. This model has an 8,192-token context window (the length of the prompt plus completion should be at most 8,192 tokens).
To make it easier to see the prompt, you can enlarge the Prompt cutie.
Because we can use a maximum of 500 tokens, we take a small portion of the Amazon SageMaker FAQs page, Low-code ML section, for our test prompt.
Folosim următorul prompt:
Prompt engineering is an iterative process. You should be clear and specific, and give the model time to think.
Here we specified the context with ## as stop sequences, which signals the model to stop generating after this character or string is generated. It’s useful when using a few-shot prompt.
Next, we are clear and very specific in our prompt, asking for a multiple-choice quiz, consisting of four questions with four options. We ask the model to include the correct answer for each question using the starting string 'Correct Answer:'
so we can parse it later using Python:
Un prompt bine conceput poate face modelul mai creativ și mai generalizat, astfel încât să se poată adapta cu ușurință la sarcini noi. Prompt-urile pot ajuta, de asemenea, la încorporarea cunoștințelor de domeniu cu privire la sarcini specifice și la îmbunătățirea interpretabilității. Ingineria promptă poate îmbunătăți considerabil performanța modelelor de învățare zero-shot și puține. Crearea de prompturi de înaltă calitate necesită o analiză atentă a sarcinii în cauză, precum și o înțelegere profundă a punctelor forte și a limitărilor modelului.
In the scope of this post, we don’t cover this wide area further.
Copy the prompt and enter it in the Prompt box, then choose Generați text.
This sends the prompt to the Jurassic-2 Jumbo Instruct model for inference. Note that experimenting in the playground is free.
Also keep in mind that despite the cutting-edge nature of LLMs, they are still prone to biases, errors, and hallucinations.
After reading the model output thoroughly and carefully, we can see that the model generated quite a good quiz!
After you have played with the model, it’s time to use the notebook and deploy it as an endpoint in your environment. We use a small Python function to parse the output and simulate an interactive test.
Deploy the Jurassic-2 Jumbo Instruct foundation model from a notebook
Puteți utiliza următoarele caiet de probă to deploy Jurassic-2 Jumbo Instruct using SageMaker. Note that this example uses an ml.p4d.24xlarge instance. If your default limit for your AWS account is 0, you need to request a limit increase for this GPU instance.
Let’s create the endpoint using SageMaker inference. First, we set the necessary variables, then we deploy the model from the model package:
După ce punctul final este implementat, puteți rula interogări de inferență pe model.
After the model is deployed, you can interact with the deployed endpoint using the following code snippet:
With the Jurassic-2 Jumbo Instruct foundation model deployed on an ml.p4d.24xlarge instance SageMaker endpoint, you can use a prompt with 4,096 tokens. You can take the same prompt we used in the playground and add many more questions. In this example, we added the FAQ’s entire Low-code ML section as context into the prompt.
We can see the output of the model, which generated a multiple-choice quiz with four questions and four options for each question.
Now you can develop a Python function to parse the output and create an interactive multiple-choice quiz.
It’s quite straightforward to develop such a function with a few lines of code. You can parse the answer easily because the model created a line with “Correct Answer: ” for each question, exactly as we requested in the prompt. We don’t provide the Python code for the quiz generation in the scope of this post.
Run the quiz in the notebook
Using the Python function we created earlier and the output from the Jurassic-2 Jumbo Instruct foundation model, we run the interactive quiz in the notebook.
You can see I answered three out of four questions correctly and got a 75% grade. Perhaps I need to read the SageMaker FAQ a few more times!
A curăța
After you have tried out the endpoint, make sure to remove the SageMaker inference endpoint and the model to prevent any charges:
Concluzie
In this post, we showed you how you can test and use AI21’s Jurassic-2 Jumbo Instruct model using SageMaker to build an automated quiz generation system. This was achieved using a rather simple prompt with a publicly available SageMaker FAQ page’s text embedded and a few lines of Python code.
Similar to this example mentioned in the post, you can customize a foundation model for your business with just a few labeled examples. Because all the data is encrypted and doesn’t leave your AWS account, you can trust that your data will remain private and confidential.
Solicitați acces la încercați modelul de fundație în SageMaker astăzi și transmiteți-ne feedback-ul dvs.!
Despre autor
Eitan Sela este arhitect de soluții specializat în învățare automată cu Amazon Web Services. El lucrează cu clienții AWS pentru a oferi îndrumare și asistență tehnică, ajutându-i să creeze și să opereze soluții de învățare automată pe AWS. În timpul liber, lui Eitan îi place să facă jogging și să citească cele mai recente articole de învățare automată.
- Distribuție de conținut bazat pe SEO și PR. Amplifică-te astăzi.
- PlatoAiStream. Web3 Data Intelligence. Cunoștințe amplificate. Accesați Aici.
- Mintând viitorul cu Adryenn Ashley. Accesați Aici.
- Cumpărați și vindeți acțiuni în companii PRE-IPO cu PREIPO®. Accesați Aici.
- Sursa: https://aws.amazon.com/blogs/machine-learning/accelerate-your-learning-towards-aws-certification-exams-with-automated-quiz-generation-using-amazon-sagemaker-foundations-models/
- :are
- :este
- :nu
- 1
- 100
- 14
- 15%
- 17
- 2018
- 23
- 500
- 7
- 8
- 9
- a
- Despre Noi
- accelera
- acces
- Cont
- precizie
- realizat
- dobândi
- de fapt
- adapta
- adăuga
- adăugat
- avans
- După
- împotriva
- algoritmi
- TOATE
- permite
- de asemenea
- Amazon
- Amazon SageMaker
- Pilot automat cu Amazon SageMaker
- Amazon SageMaker JumpStart
- Amazon Web Services
- Sume
- an
- și
- răspunde
- Orice
- api
- aplicat
- arhitectură
- SUNT
- ZONĂ
- Artă
- bunuri
- AS
- Asistență
- asociate
- At
- Automata
- disponibil
- AWS
- bar
- de bază
- bazat
- BE
- deoarece
- deveni
- înainte
- Benchmark
- distorsiunilor
- Miliard
- miliarde
- Floare
- atât
- Cutie
- construi
- construit-in
- afaceri
- by
- CAN
- Carieră
- atent
- cu grijă
- caz
- cazuri
- Certificare
- Certificate
- caracter
- Caracteristici
- taxe
- alegere
- Alege
- clasă
- clasificare
- clar
- cod
- cum
- vine
- completare
- cuprinzător
- considerare
- Constând
- Consoleze
- conține
- conţinut
- context
- corecta
- ar putea
- acoperi
- crea
- a creat
- Crearea
- Creator
- curator
- clienţii care
- personalizabil
- personaliza
- ultima generație
- de date
- zi
- adânc
- Mai adânc
- Mod implicit
- Cerere
- Prognoza cererii
- implementa
- dislocate
- Implementarea
- descriere
- În ciuda
- Detectare
- dezvolta
- Dezvoltare
- diferit
- digital
- Artă digitală
- do
- Nu
- domeniu
- Dont
- fiecare
- Mai devreme
- mai ușor
- cu ușurință
- ușor de folosit
- încorporat
- permițând
- criptate
- Punct final
- Inginerie
- mări
- Intrați
- Întreg
- Mediu inconjurator
- Erori
- evaluarea
- Chiar
- exact
- examen
- exemplu
- exemple
- existent
- scump
- experienţă
- expert
- experți
- Față
- FAQ
- puțini
- camp
- Găsi
- First
- potrivi
- urma
- următor
- Pentru
- Fundație
- Fundații
- patru
- fraudă
- detectarea fraudei
- Gratuit
- din
- complet
- distracţie
- funcţie
- mai mult
- genera
- generată
- generator
- generaţie
- obține
- obtinerea
- Da
- dat
- Go
- bine
- GPU
- calitate
- foarte mult
- Teren
- îndrumare
- ghida
- Jumătate
- mână
- Avea
- he
- ajutor
- ajutor
- ajută
- de înaltă calitate
- lui
- Lovit
- găzduit
- Cum
- Totuși
- HTML
- HTTPS
- Butuc
- mare
- i
- identificat
- if
- imagine
- Clasificarea imaginilor
- important
- îmbunătăţi
- in
- include
- include
- Inclusiv
- incorpora
- informații
- inovatoare
- intrare
- instanță
- instrucțiuni
- interacţiona
- interactiv
- în
- IT
- ESTE
- Loc de munca
- doar
- A pastra
- Cunoaște
- cunoştinţe
- cunoscut
- Labs
- limbă
- mare
- mai tarziu
- Ultimele
- lansa
- învăţare
- Părăsi
- lăsând
- Lungime
- lăsa
- LIMITĂ
- limitări
- Linie
- linii
- Listă
- listat
- listare
- LLM
- log
- cautati
- maşină
- masina de învățare
- făcut
- întreținere
- face
- manual
- multe
- masiv
- max
- maxim
- menționat
- milion
- minte
- ML
- model
- Modele
- modifica
- mai mult
- cele mai multe
- multiplu
- my
- Natural
- Procesarea limbajului natural
- Natură
- Navigaţi
- Navigare
- necesar
- Nevoie
- necesar
- nu
- Nou
- nlp
- Nu.
- caiet
- număr
- obiect
- Detectarea obiectelor
- of
- oferit
- on
- ONE
- cele
- în curs de desfășurare
- open-source
- funcionar
- optimizate
- Opţiuni
- or
- comandă
- al nostru
- afară
- producție
- peste
- pachet
- pagină
- pâine
- parametrii
- în special
- petreceri
- Efectua
- performanță
- efectua
- poate
- Plato
- Informații despre date Platon
- PlatoData
- a jucat
- la care se adauga
- Popular
- popularitate
- porţiune
- Post
- Predictor
- pregătirea
- prezenta
- împiedica
- Anunţ
- privat
- proces
- prelucrare
- producere
- proiect
- Propulsa
- proprietate
- furniza
- furnizori
- furnizează
- public
- Piton
- pirtorh
- interogări
- întrebare
- Întrebări
- repede
- ridicare
- gamă
- mai degraba
- Citeste
- Citind
- gata
- recent
- legate de
- rămâne
- scoate
- solicita
- necesar
- Necesită
- revizuiască
- Ridica
- Rol
- Alerga
- funcţionare
- sagemaker
- SageMaker Inference
- acelaşi
- Scară
- domeniu
- script-uri
- sdk
- Caută
- Secțiune
- secțiuni
- vedea
- văzut
- trimite
- propoziție
- servi
- serviciu
- Servicii
- set
- instalare
- comun
- Pantaloni scurți
- să
- prezenta
- a arătat
- semnalele
- simplu
- Mărimea
- calificat
- aptitudini
- mic
- So
- soluţie
- soluţii
- unele
- specialist
- specific
- specificată
- început
- Pornire
- de ultimă oră
- Pas
- paşi
- Încă
- Stop
- oprit
- simplu
- puncte forte
- Şir
- astfel de
- Suportat
- Sprijină
- apare
- sistem
- Lua
- Sarcină
- sarcini
- Tehnic
- tensorflow
- termeni
- test
- Clasificarea textului
- decât
- acea
- Lor
- se
- apoi
- Acolo.
- Acestea
- ei
- crede
- Al treilea
- terțe părți
- acest
- complet
- aceste
- trei
- Prin
- timp
- ori
- la
- astăzi
- indicativele
- top
- subiect
- față de
- Tren
- dresat
- Pregătire
- transformator
- Traducere
- proces
- studii
- încercat
- Încredere
- încerca
- ui
- în
- înţelege
- înţelegere
- Actualizează
- us
- Folosire
- utilizare
- carcasa de utilizare
- utilizat
- utilizări
- folosind
- foarte
- de
- Vizualizare
- viziune
- Vizita
- vrea
- a fost
- we
- web
- servicii web
- BINE
- Ce
- cand
- dacă
- care
- larg
- Gamă largă
- voi
- cu
- în
- fără
- flux de lucru
- fabrică
- scris
- XGBoost
- ani
- da
- Tu
- Ta
- te
- zephyrnet