Il modello di fondazione Falcon 180B di TII è ora disponibile tramite Amazon SageMaker JumpStart | Servizi Web di Amazon

Il modello di fondazione Falcon 180B di TII è ora disponibile tramite Amazon SageMaker JumpStart | Servizi Web di Amazon

Oggi siamo lieti di annunciare che il modello di fondazione Falcon 180B sviluppato dal Technology Innovation Institute (TII) e addestrato su Amazon SageMaker è disponibile per i clienti tramite JumpStart di Amazon SageMaker da distribuire con un clic per eseguire l'inferenza. Con una dimensione di 180 miliardi di parametri e addestrato su un enorme set di dati di 3.5 trilioni di token, Falcon 180B è il modello più grande e uno dei più performanti con pesi liberamente accessibili. Puoi provare questo modello con SageMaker JumpStart, un hub di machine learning (ML) che fornisce accesso ad algoritmi, modelli e soluzioni ML in modo da poter iniziare rapidamente con il ML. In questo post spiegheremo come scoprire e distribuire il modello Falcon 180B tramite SageMaker JumpStart.

Cos'è il Falcon 180B

Falcon 180B è un modello rilasciato da IO ESSO che segue le versioni precedenti della famiglia Falcon. È una versione ingrandita di Falcon 40B e utilizza l'attenzione multi-query per una migliore scalabilità. È un modello linguistico autoregressivo che utilizza un'architettura di trasformatore ottimizzata. È stato addestrato su 3.5 trilioni di token di dati, costituiti principalmente da dati web provenienti da Web raffinato (circa 85%). Il modello ha due versioni: 180B e 180B-Chat. 180B è un modello grezzo e preaddestrato, che dovrebbe essere ulteriormente perfezionato per la maggior parte dei casi d'uso. 180B-Chat è più adatto a ricevere istruzioni generiche. Il modello Chat è stato perfezionato sui set di dati di chat e istruzioni insieme a diversi set di dati conversazionali su larga scala.

Il modello è reso disponibile con il Licenza TII Falcon-180B ed Acceptable Use Policy.

Falcon 180B è stato addestrato da TII Amazon Sage Maker, su un cluster di circa GPU A4 100K. Ha utilizzato una base di codice di addestramento distribuito personalizzata denominata Gigatron, che utilizza il parallelismo 3D con ZeRO e kernel Triton personalizzati e ad alte prestazioni. L'architettura di formazione distribuita utilizzata Servizio di archiviazione semplice Amazon (Amazon S3) come unico servizio unificato per il caricamento dei dati e la scrittura e lettura dei checkpoint, che ha contribuito in particolare all'affidabilità del carico di lavoro e alla semplicità operativa.

Cos'è SageMaker JumpStart

Con SageMaker JumpStart, i professionisti del machine learning possono scegliere da un elenco crescente di modelli di base con le migliori prestazioni. I professionisti del machine learning possono distribuire modelli di base su istanze SageMaker dedicate all'interno di un ambiente isolato di rete e personalizzare i modelli utilizzando Amazon SageMaker per l'addestramento e la distribuzione dei modelli.

Ora puoi scoprire e distribuire Falcon 180B con pochi clic Amazon Sage Maker Studio o a livello di programmazione tramite SageMaker Python SDK, consentendoti di derivare le prestazioni del modello e i controlli MLOps con funzionalità SageMaker come Pipeline di Amazon SageMaker, Debugger di Amazon SageMakero log del contenitore. Il modello viene distribuito in un ambiente sicuro AWS e sotto i controlli VPC, contribuendo a garantire la sicurezza dei dati. Falcon 180B è rilevabile e può essere distribuito nelle regioni in cui sono disponibili le istanze richieste. Al momento, le istanze ml.p4de sono disponibili negli Stati Uniti orientali (Virginia settentrionale) e negli Stati Uniti occidentali (Oregon).

Scopri i modelli

Puoi accedere ai modelli di base tramite SageMaker JumpStart nell'interfaccia utente di SageMaker Studio e SageMaker Python SDK. In questa sezione, esamineremo come scoprire i modelli in SageMaker Studio.

SageMaker Studio è un ambiente di sviluppo integrato (IDE) che fornisce un'unica interfaccia visiva basata sul Web in cui è possibile accedere a strumenti specifici per eseguire tutte le fasi di sviluppo ML, dalla preparazione dei dati alla creazione, formazione e distribuzione dei modelli ML. Per ulteriori dettagli su come iniziare e configurare SageMaker Studio, fare riferimento a Amazon Sage Maker Studio.

In SageMaker Studio è possibile accedere a SageMaker JumpStart, che contiene modelli pre-addestrati, notebook e soluzioni predefinite, in Soluzioni predefinite e automatizzate.

Falcon 180B foundation model from TII is now available via Amazon SageMaker JumpStart | Amazon Web Services PlatoBlockchain Data Intelligence. Vertical Search. Ai.

Dalla pagina di destinazione JumpStart di SageMaker è possibile cercare soluzioni, modelli, notebook e altre risorse. Puoi trovare Falcon 180B nel Modelli di fondazione: generazione di testo giostra

Falcon 180B foundation model from TII is now available via Amazon SageMaker JumpStart | Amazon Web Services PlatoBlockchain Data Intelligence. Vertical Search. Ai.

Puoi trovare anche altre varianti del modello scegliendo Esplora tutti i modelli di generazione di testo o cercando Falcon.

Falcon 180B foundation model from TII is now available via Amazon SageMaker JumpStart | Amazon Web Services PlatoBlockchain Data Intelligence. Vertical Search. Ai.

Puoi scegliere la scheda del modello per visualizzare i dettagli sul modello come licenza, dati utilizzati per l'addestramento e modalità di utilizzo. Troverai anche due pulsanti, Schierare ed Apri taccuino, che ti aiuterà a utilizzare il modello (lo screenshot seguente mostra il file Schierare opzione).

Falcon 180B foundation model from TII is now available via Amazon SageMaker JumpStart | Amazon Web Services PlatoBlockchain Data Intelligence. Vertical Search. Ai.

Distribuire modelli

Quando si sceglie Schierare, verrà avviata la distribuzione del modello. In alternativa, è possibile eseguire la distribuzione tramite il notebook di esempio visualizzato scegliendo Apri taccuino. Il notebook di esempio fornisce indicazioni end-to-end su come distribuire il modello per l'inferenza e pulire le risorse.

Per eseguire la distribuzione utilizzando un notebook, iniziamo selezionando un modello appropriato, specificato dal model_id. Puoi distribuire uno qualsiasi dei modelli selezionati su SageMaker con il seguente codice:

from sagemaker.jumpstart.model import JumpStartModel my_model = JumpStartModel(model_id="huggingface-llm-falcon-180b-chat-bf16") predictor = my_model.deploy()

Questo distribuisce il modello su SageMaker con configurazioni predefinite, inclusi il tipo di istanza predefinito e le configurazioni VPC predefinite. È possibile modificare queste configurazioni specificando valori non predefiniti in JumpStartModel. Per saperne di più fare riferimento al Documentazione delle API. Dopo la distribuzione, puoi eseguire l'inferenza sull'endpoint distribuito tramite un predittore SageMaker. Vedere il seguente codice:

payload = { "inputs": "User: Hello!nFalcon: ", "parameters": {"max_new_tokens": 256, "top_p": 0.9, "temperature": 0.6}
}
response = predictor.predict(payload)

I parametri di inferenza controllano il processo di generazione del testo all'endpoint. Il controllo massimo di nuovi token si riferisce alla dimensione dell'output generato dal modello. Tieni presente che questo non è lo stesso numero di parole perché il vocabolario del modello non è lo stesso del vocabolario della lingua inglese e ogni token potrebbe non essere una parola della lingua inglese. La temperatura controlla la casualità nell'output. Una temperatura più elevata si traduce in risultati più creativi e allucinati. Tutti i parametri di inferenza sono facoltativi.

Questo modello con parametri da 180B è di 335 GB e richiede ancora più memoria GPU per eseguire un'inferenza sufficiente con una precisione a 16 bit. Attualmente, JumpStart supporta questo modello solo su istanze ml.p4de.24xlarge. È possibile distribuire un modello quantizzato a 8 bit su un'istanza ml.p4d.24xlarge fornendo il env={"HF_MODEL_QUANTIZE": "bitsandbytes"} argomento della parola chiave per il JumpStartModel costruttore e specificazione instance_type="ml.p4d.24xlarge" al metodo di distribuzione. Tuttavia, tieni presente che la latenza per token è circa 5 volte più lenta per questa configurazione quantizzata.

La tabella seguente elenca tutti i modelli Falcon disponibili in SageMaker JumpStart insieme agli ID modello, ai tipi di istanza predefiniti, al numero massimo di token totali (somma del numero di token di input e numero di token generati) supportati e alla tipica latenza di risposta per token per ciascuno di questi modelli.

Nome del modello ID modello Tipo di istanza predefinito Gettoni totali massimi Latenza per token*
Falcon 7B huggingface-llm-falcon-7b-bf16 ml.g5.2xgrande 2048 ms 34
Falcon 7B Istruttore huggingface-llm-falcon-7b-instruct-bf16 ml.g5.2xgrande 2048 ms 34
Falcon 40B huggingface-llm-falcon-40b-bf16 ml.g5.12xgrande 2048 ms 57
Falcon 40B Istruttore huggingface-llm-falcon-40b-instruct-bf16 ml.g5.12xgrande 2048 ms 57
Falcon 180B huggingface-llm-falcon-180b-bf16 ml.p4de.24xlarge 2048 ms 45
Chatta sul Falcon 180B huggingface-llm-falcon-180b-chat-bf16 ml.p4de.24xlarge 2048 ms 45

*la latenza per token è fornita per il tempo di risposta mediano dei prompt di esempio forniti in questo blog; questo valore varierà in base alla lunghezza delle sequenze di input e output.

Inferenza e suggerimenti di esempio per Falcon 180B

I modelli Falcon possono essere utilizzati per il completamento del testo per qualsiasi parte di testo. Attraverso la generazione del testo, puoi eseguire una serie di attività, come rispondere a domande, tradurre la lingua, analizzare il sentiment e molto altro. L'endpoint accetta il seguente schema di payload di input:

payload = { "inputs": str, (optional)"parameters": { "do_sample": bool, "max_new_tokens": int, "repetition_penalty": float, "return_full_text": bool, "stop": List[str], "seed": int, "temperature": float, "top_k": int, "top_p": float, "truncate": int, "typical_p": float, "best_of": int, "watermark": bool, "details": bool, "decoder_input_details": bool, }
}

Puoi esplorare la definizione di questi parametri del cliente e i loro valori predefiniti all'interno del repository di inferenza di generazione di testo.

Di seguito sono riportati alcuni esempi di prompt e il testo generato dal modello. Tutti gli output qui sono generati con parametri di inferenza {"max_new_tokens": 768, "stop": ["<|endoftext|>", "###"]}.

La creazione di un sito web può essere eseguita in 10 semplici passaggi:

Input Building a website can be done in 10 simple steps: Output
- Choose a domain name
- Register your domain name
- Choose a web host
- Choose a website builder
- Create your website
- Add content to your website
- Add pages to your website
- Add images to your website
- Add videos to your website
- Add social media to your website
1. Choose a domain name
A domain name is the address of your website. It is what people will type into their browser to find your website. For example, the domain name of this website is.
When choosing a domain name, you should choose something that is easy to remember and that represents your business or website. You should also make sure that the domain name is available. You can check if a domain name is available by using a domain name search tool.
2. Register your domain name
Once you have chosen a domain name, you need to register it. This can be done through a domain name registrar. A domain name registrar is a company that manages the registration of domain names.
When registering your domain name, you will need to provide your contact information and choose a payment method. You will also need to choose a domain name extension. The most common domain name extensions are .com, .net, and .org.
3. Choose a web host
A web host is a company that provides space on a server for your website. When choosing a web host, you should choose one that is reliable and that offers good customer support. You should also make sure that the web host offers the features that you need for your website.
4. Choose a website builder
A website builder is a tool that allows you to create a website without having to learn how to code. There are many different website builders available, so you should choose one that is easy to use and that offers the features that you need.
5. Create your website
Once you have chosen a website builder, you can start creating your website. You will need to choose a template for your website and then add content to your website.
6. Add content to your website
The content of your website is what will make your website unique. You should add content that is relevant to your business or website. You can add text, images, videos, and other types of content to your website.
7. Add pages to your website
A website is made up of pages. You can add as many pages as you want to your website. Each page should have a different purpose. For example, you might have a page for your home page, a page for your about page, and a page for your contact page.
8. Add images to your website
Images can make your website more visually appealing. You can add images to your website by uploading them to your website or by using a image hosting service.
9. Add videos to your website
Videos can also make your website more visually appealing. You can add videos to your website by uploading them to your website or by using a video hosting service.
10. Add social media to your website
Social media can help you promote your website. You can add social media buttons to your website so that people can share your website on social media. You can also add social media feeds to your website so that people can see your latest social media posts.

Potresti notare che questo modello preaddestrato genera lunghe sequenze di testo che non sono necessariamente ideali per i casi d'uso dei dialoghi. Prima di mostrare come funziona il modello di chat ottimizzato per un insieme più ampio di istruzioni basate su dialoghi, i prossimi due esempi illustrano come utilizzare i modelli Falcon con l'apprendimento in contesto con poche riprese, in cui forniamo esempi di formazione disponibili per il modello. Tieni presente che il "few-shot learning" non modifica i pesi del modello: durante questo processo eseguiamo solo inferenze sul modello distribuito, fornendo al contempo alcuni esempi nel contesto di input per aiutare l'output del modello di gilda.

Input
Tweet: "I hate it when my phone battery dies."
Sentiment: Negative
###
Tweet: "My day has been :+1:"
Sentiment: Positive
###
Tweet: "This is the link to the article"
Sentiment: Neutral
###
Tweet: "This new music video was incredible"
Sentiment: Output Positive
###

Input
Translate English to French:
sea otter => loutre de mer
###
peppermint => menthe poivrée
###
plush girafe => girafe peluche
###
cheese => Output fromage
###

Inferenza e suggerimenti di esempio per Falcon 180B-Chat

Con i modelli Falcon 180B-Chat, ottimizzati per i casi d'uso del dialogo, l'input agli endpoint del modello di chat può contenere la cronologia precedente tra l'assistente di chat e l'utente. Puoi porre domande contestuali alla conversazione avvenuta finora. Puoi anche fornire la configurazione del sistema, come i personaggi, che definiscono il comportamento dell'assistente chat. Il carico utile in ingresso all'endpoint è lo stesso del modello Falcon 180B tranne il inputs il valore stringa deve utilizzare il seguente formato:

System: <An optional system prompt>
User: <Optional user message history>
Falcon: <Optional chat history Falcon response>
User: <Current user message>
Falcon:

Di seguito sono riportati alcuni esempi di prompt e il testo generato dal modello. Tutti gli output sono generati con parametri di inferenza {"max_new_tokens":256, "stop": ["nUser:", "<|endoftext|>", " User:", "###"]}.

Input
System: You are a helpful assistant
User: What is Amazon SageMaker JumpStart?
Falcon: Output Amazon SageMaker JumpStart is a capability of Amazon SageMaker that provides a set of solutions to common machine learning problems. These solutions include pre-built machine learning models, algorithms, and pre-configured model training and deployment settings. JumpStart also provides sample notebooks that demonstrate how to use these solutions for various use cases. The goal of JumpStart is to help users get started with machine learning quickly and easily, without the need for extensive machine learning expertise.
User:

Input
User: Simply put, the theory of relativity states that
Falcon: Output 1. The laws of physics are the same for all observers in uniform motion relative to one another.
2. The speed of light in a vacuum is the same for all observers, regardless of their motion or the motion of the light source.
3. Time and space are relative, meaning that they can vary depending on the observer's frame of reference.
4. Mass and energy are interchangeable, as expressed by the famous equation E=mc².
User:

Input
User: Building a website can be done in 10 simple steps:
Falcon: Output
1. Determine the purpose and goals of your website.
2. Choose a domain name and register it.
3. Select a web hosting provider and sign up for a plan.
4. Choose a website builder or content management system (CMS) to use.
5. Select a theme or template for your website.
6. Customize the design and layout of your website.
7. Add content to your website, including text, images, and videos.
8. Set up navigation menus and links to make your website easy to navigate.
9. Test your website to ensure it is functioning properly and is mobile-friendly.
10. Launch your website and promote it to attract visitors.
User:

Input
System: Always answer with a Haiku.
User: I am deploying a large language model on Amazon SageMaker JumpStart. What should I do?
Falcon: Output "JumpStart" your dreams,
Deploy with ease, scale with glee,
SageMaker awaits.

Input
System: Generate a table summarizing the options outlined in this email.
User: Team, we have to make a decision on the product plan for Goocrux v2. The first option will take us 3 weeks of development, and will achieve performance of 80ms, but means that the UI has to change. The second option will take us 4 weeks of development, and will achieve performance of 60ms, without any UI change. The third option will take the longest -- 6 weeks of development, will achieve performance of 30ms, without any UI change. A markdown table with four columns: (1) Option ID, (2) Development time, (3) Performance, (4) UI Change.
Falcon: Output
| Option ID | Development time | Performance | UI Change |
| --- | --- | --- | --- |
| 1 | 3 weeks | 80ms | Yes |
| 2 | 4 weeks | 60ms | No |
| 3 | 6 weeks | 30ms | No |

Input
System: You always translate English to French.
User: sea otter => loutre de mer
peppermint => menthe poivrée
plush girafe => girafe peluche
cheese =>
Falcon: Output
=> fromage

Input
System: Classify the user prompt as Negative, Positive, or Neutral sentiment. Use a short response.
User: Tweet: "This new music video was awesome" Falcon: Output "Positive"

Input
User: What is the recipe of mayonnaise?
Falcon: Output 1. In a mixing bowl, whisk together 1 egg yolk, 1 tablespoon of Dijon mustard, and 1 tablespoon of lemon juice until well combined.
2. While whisking continuously, slowly drizzle in 1 cup of vegetable oil until the mixture thickens and emulsifies.
3. Season with salt and pepper to taste.
4. Store in an airtight container in the refrigerator for up to one week.
User:

Nell'esempio seguente, l'utente ha avuto una conversazione con l'assistente sui siti turistici di Parigi. Successivamente, l'utente chiede quale sia la prima opzione consigliata dall'assistente chat.

Input
System: You are a helpful trip planner.
User: I am going to Paris, what should I see?
Falcon: 1. Eiffel Tower: No trip to Paris is complete without a visit to the iconic Eiffel Tower.
2. Louvre Museum: Home to some of the world's most famous art, including the Mona Lisa.
3. Notre-Dame Cathedral: A stunning example of Gothic architecture and a must-see for history buffs.
4. Champs-Élysées: One of the most famous avenues in the world, lined with shops, cafes, and theaters.
5. Montmartre: A charming neighborhood known for its bohemian vibe, street art, and stunning views of the city.
6. Palace of Versailles: A short train ride from Paris, this opulent palace was once the seat of French royalty.
7. Musée d'Orsay: Housed in a former train station, this museum boasts an impressive collection of Impressionist and Post-Impressionist art.
8. Sainte-Chapelle: A hidden gem in the heart of Paris, this medieval chapel is famous for its stunning stained glass windows.
9. Luxembourg Gardens: A beautiful park in the heart of the city, perfect for a picnic or a leisurely stroll.
User: What is so great about #1?
Falcon: Output
#1 is the Eiffel Tower, which is one of the most famous landmarks in the world. It is a symbol of Paris and a must-see attraction for many visitors. The tower offers stunning views of the city from its observation decks, and it is especially beautiful when lit up at night. Additionally, the Eiffel Tower has a rich history and is an engineering marvel, making it a fascinating destination for anyone interested in architecture or history.
User:

ripulire

Dopo aver terminato l'esecuzione del notebook, assicurati di eliminare tutte le risorse create nel processo in modo che la fatturazione venga interrotta. Utilizza il seguente codice:

predictor.delete_model()
predictor.delete_endpoint()

Conclusione

In questo post ti abbiamo mostrato come iniziare con Falcon 180B in SageMaker Studio e distribuire il modello per l'inferenza. Poiché i modelli di base sono pre-addestrati, possono contribuire a ridurre i costi di formazione e infrastruttura e consentire la personalizzazione per il tuo caso d'uso. Visita subito SageMaker JumpStart in SageMaker Studio per iniziare.

Risorse


Informazioni sugli autori

Falcon 180B foundation model from TII is now available via Amazon SageMaker JumpStart | Amazon Web Services PlatoBlockchain Data Intelligence. Vertical Search. Ai.Dottor Kyle Ulrich è uno scienziato applicato del team JumpStart di Amazon SageMaker. I suoi interessi di ricerca includono algoritmi scalabili di apprendimento automatico, visione artificiale, serie temporali, parametri bayesiani non parametrici e processi gaussiani. Ha conseguito il dottorato di ricerca presso la Duke University e ha pubblicato articoli su NeurIPS, Cell e Neuron.

Falcon 180B foundation model from TII is now available via Amazon SageMaker JumpStart | Amazon Web Services PlatoBlockchain Data Intelligence. Vertical Search. Ai.Dottor Ashish Khetan è uno scienziato applicato senior presso Amazon SageMaker JumpStart e aiuta a sviluppare algoritmi di apprendimento automatico. Ha conseguito il dottorato di ricerca presso l'Università dell'Illinois Urbana-Champaign. È un ricercatore attivo nel campo dell'apprendimento automatico e dell'inferenza statistica e ha pubblicato numerosi articoli nelle conferenze NeurIPS, ICML, ICLR, JMLR, ACL e EMNLP.

Falcon 180B foundation model from TII is now available via Amazon SageMaker JumpStart | Amazon Web Services PlatoBlockchain Data Intelligence. Vertical Search. Ai.Olivier CruchanÈ Principal Machine Learning Specialist Solutions Architect presso AWS, con sede in Francia. Olivier aiuta i clienti AWS, dalle piccole startup alle grandi imprese, a sviluppare e distribuire applicazioni di machine learning di livello produttivo. Nel tempo libero gli piace leggere articoli di ricerca ed esplorare la natura selvaggia con amici e familiari.

Falcon 180B foundation model from TII is now available via Amazon SageMaker JumpStart | Amazon Web Services PlatoBlockchain Data Intelligence. Vertical Search. Ai.Carlo Albertsen guida l'hub del modello di base, gli algoritmi e i team di partnership di Amazon SageMaker.

Timestamp:

Di più da Apprendimento automatico di AWS