At present, we’re excited to announce that the primary mannequin within the subsequent technology Falcon 2 household, the Falcon 2 11B basis mannequin (FM) from Know-how Innovation Institute (TII), is accessible via Amazon SageMaker JumpStart to deploy and run inference.
Falcon 2 11B is a educated dense decoder mannequin on a 5.5 trillion token dataset and helps a number of languages. The Falcon 2 11B mannequin is accessible on SageMaker JumpStart, a machine studying (ML) hub that gives entry to built-in algorithms, FMs, and pre-built ML options you can deploy shortly and get began with ML quicker.
On this put up, we stroll via how one can uncover, deploy, and run inference on the Falcon 2 11B mannequin utilizing SageMaker JumpStart.
What’s the Falcon 2 11B mannequin
Falcon 2 11B is the primary FM launched by TII beneath their new synthetic intelligence (AI) mannequin sequence Falcon 2. It’s a subsequent technology mannequin within the Falcon household—a extra environment friendly and accessible giant language mannequin (LLM) that’s educated on a 5.5 trillion token dataset primarily consisting of internet knowledge from RefinedWeb with 11 billion parameters. It’s constructed on causal decoder-only structure, making it highly effective for auto-regressive duties. It’s outfitted with multilingual capabilities and may seamlessly deal with duties in English, French, Spanish, German, Portuguese, and different languages for various eventualities.
Falcon 2 11B is a uncooked, pre-trained mannequin, which is usually a basis for extra specialised duties, and likewise means that you can fine-tune the mannequin for particular use circumstances similar to summarization, textual content technology, chatbots, and extra.
Falcon 2 11B is supported by the SageMaker TGI Deep Studying Container (DLC) which is powered by Text Generation Inference (TGI), an open supply, purpose-built resolution for deploying and serving LLMs that allows high-performance textual content technology utilizing tensor parallelism and dynamic batching.
The mannequin is accessible beneath the TII Falcon License 2.0, the permissive Apache 2.0-based software program license, which incorporates an acceptable use policy that promotes the accountable use of AI.
What’s SageMaker JumpStart
SageMaker JumpStart is a strong function throughout the SageMaker ML platform that gives ML practitioners a complete hub of publicly obtainable and proprietary FMs. With this managed service, ML practitioners get entry to a rising checklist of cutting-edge fashions from main mannequin hubs and suppliers that they will deploy to devoted SageMaker situations inside a community remoted surroundings, and customise fashions utilizing SageMaker for mannequin coaching and deployment.
You’ll be able to uncover and deploy the Falcon 2 11B mannequin with a number of clicks in Amazon SageMaker Studio or programmatically via the SageMaker Python SDK, enabling you to derive mannequin efficiency and MLOps controls with SageMaker options similar to Amazon SageMaker Pipelines, Amazon SageMaker Debugger, or container logs. The Falcon 2 11B mannequin is accessible in the present day for inferencing from 22 AWS Areas the place SageMaker JumpStart is accessible. Falcon 2 11B would require g5 and p4 situations.
Conditions
To check out the Falcon 2 mannequin utilizing SageMaker JumpStart, you want the next stipulations:
- An AWS account that may comprise all of your AWS sources.
- An AWS Identification and Entry Administration (IAM) position to entry SageMaker. To be taught extra about how IAM works with SageMaker, consult with Identification and Entry Administration for Amazon SageMaker.
- Entry to SageMaker Studio or a SageMaker pocket book occasion or an interactive growth surroundings (IDE) similar to PyCharm or Visible Studio Code. We suggest utilizing SageMaker Studio for simple deployment and inference.
Uncover Falcon 2 11B in SageMaker JumpStart
You’ll be able to entry the FMs via SageMaker JumpStart within the SageMaker Studio UI and the SageMaker Python SDK. On this part, we go over how one can uncover the fashions in SageMaker Studio.
SageMaker Studio is an IDE that gives a single web-based visible interface the place you’ll be able to entry purpose-built instruments to carry out all ML growth steps, from getting ready knowledge to constructing, coaching, and deploying your ML fashions. For extra particulars on how one can get began and arrange SageMaker Studio, consult with Amazon SageMaker Studio.
In SageMaker Studio, you’ll be able to entry SageMaker JumpStart by selecting JumpStart within the navigation pane or by selecting JumpStart from the Residence web page.
From the SageMaker JumpStart touchdown web page, you’ll find pre-trained fashions from the preferred mannequin hubs. You’ll be able to seek for Falcon within the search field. The search outcomes will checklist the Falcon 2 11B textual content technology mannequin and different Falcon mannequin variants obtainable.

You’ll be able to select the mannequin card to view particulars in regards to the mannequin similar to license, knowledge used to coach, and how one can use the mannequin. Additionally, you will discover two choices, Deploy and Preview notebooks, to deploy the mannequin and create an endpoint.

Deploy the mannequin in SageMaker JumpStart
Deployment begins whenever you select Deploy. SageMaker performs the deploy operations in your behalf utilizing the IAM SageMaker position assigned within the deployment configurations. After deployment is full, you will note that an endpoint is created. You’ll be able to take a look at the endpoint by passing a pattern inference request payload or by deciding on the testing choice utilizing the SDK. If you use the SDK, you will note instance code that you should utilize within the pocket book editor of your selection in SageMaker Studio.
Falcon 2 11B textual content technology
To deploy utilizing the SDK, we begin by deciding on the Falcon 2 11B mannequin, specified by the model_id with worth huggingface-llm-falcon2-11b. You’ll be able to deploy any of the chosen fashions on SageMaker with the next code. Equally, you’ll be able to deploy the Falcon 2 11B LLM utilizing its personal mannequin ID.
This deploys the mannequin on SageMaker with default configurations, together with the default occasion sort and default VPC configurations. You’ll be able to change these configurations by specifying non-default values in JumpStartModel. The really helpful occasion sorts for this mannequin endpoint utilization are ml.g5.12xlarge, ml.g5.24xlarge, ml.g5.48xlarge, or ml.p4d.24xlarge. Ensure you have the account-level service restrict for a number of of those occasion sorts to deploy this mannequin. For extra info, consult with Requesting a quota enhance.
After it’s deployed, you’ll be able to run inference towards the deployed endpoint via the SageMaker predictor:
Instance prompts
You’ll be able to work together with the Falcon 2 11B mannequin like every customary textual content technology mannequin, the place the mannequin processes an enter sequence and outputs predicted subsequent phrases within the sequence. On this part, we offer some instance prompts and pattern output.
Textual content technology
The next is an instance immediate for textual content generated by the mannequin:
The next is the output:
Code technology
Utilizing the previous instance, we will use code technology prompts as follows:
The code makes use of Falcon 2 11B to generate a Python operate that writes a JSON file. It defines a payload dictionary with the enter immediate "Write a operate in Python to jot down a json file:" and a few parameters to manage the technology course of, like the utmost variety of tokens to generate and whether or not to allow sampling. It then sends this payload to a predictor (seemingly an API), receives the generated textual content response, and prints it to the console. The printed output ought to be the Python operate for writing a JSON file, as requested within the immediate.
The next is the output:
The output from the code technology defines the write_json_file that takes the file identify and a Python object and writes the item as JSON knowledge. Falcon 2 11B makes use of the built-in JSON module and handles exceptions. An instance utilization is offered on the backside, writing a dictionary with identify, age, and metropolis keys to a file named knowledge.json. The output exhibits the anticipated JSON file content material, illustrating the mannequin’s pure language processing (NLP) and code technology capabilities.
Sentiment evaluation
You’ll be able to carry out sentiment evaluation utilizing a immediate like the next with Falcon 2 11B:
The next is the output:
The code for sentiment evaluation demonstrates utilizing Falcon 2 11B to offer examples of tweets with their corresponding sentiment labels (optimistic, unfavorable, impartial). The final tweet (“I like spending time with my household”) is left and not using a sentiment to immediate the mannequin to generate the classification itself. The max_new_tokens parameter is ready to 2, indicating that the mannequin ought to generate a brief output, seemingly simply the sentiment label. With do_sample set to true, the mannequin can pattern from its output distribution, probably main to higher outcomes for sentiment duties. Classification based mostly on textual content inputs and patterns realized from earlier examples is what teaches this mannequin to output the specified and correct response.
Query answering
It’s also possible to use a query answering immediate like the next with Falcon 2 11B:
The next is the output:
The consumer sends an enter query or immediate to Falcon 2 11B, together with parameters like the utmost variety of tokens to generate and whether or not to allow sampling. The mannequin then generates a related response based mostly on its understanding of the query and its coaching knowledge. After the preliminary response, a follow-up query is requested, and the mannequin offers one other reply, showcasing its capacity to interact in a conversational question-answering course of.
Multilingual capabilities
You should utilize languages similar to German, Spanish, French, Italian, Portuguese, Polish, Dutch, Romanian, Czech, and Swedish with Falcon 2 11B. Within the following code, we show the mannequin’s multilingual capabilities:
The next is the output:
Arithmetic and reasoning
Falcon 2 11B fashions additionally report energy in mathematic accuracy:
The next is the output:
The code exhibits Falcon 2 11B’s functionality to understand pure language prompts involving mathematical reasoning, break them down into logical steps, and generate human-like explanations and options.
Clear up
After you’re finished working the pocket book, delete all of the sources you created within the course of so your billing is stopped. Use the next code:
Conclusion
On this put up, we confirmed you how one can get began with Falcon 2 11B in SageMaker Studio and deploy the mannequin for inference. As a result of FMs are pre-trained, they will help decrease coaching and infrastructure prices and allow customization on your use case.
Go to SageMaker JumpStart in SageMaker Studio now to get began. For extra info, consult with SageMaker JumpStart, JumpStart Basis Fashions, and Getting began with Amazon SageMaker JumpStart.
Concerning the Authors
Supriya Puragundla is a Senior Options Architect at AWS. She helps key buyer accounts on their generative AI and AI/ML journeys. She is captivated with data-driven AI and the world of depth in ML and generative AI.
Armando Diaz is a Options Architect at AWS. He focuses on generative AI, AI/ML, and knowledge analytics. At AWS, Armando helps prospects combine cutting-edge generative AI capabilities into their techniques, fostering innovation and aggressive benefit. When he’s not at work, he enjoys spending time together with his spouse and household, climbing, and touring the world.
Niithiyn Vijeaswaran is an Enterprise Options Architect at AWS. His space of focus is generative AI and AWS AI Accelerators. He holds a Bachelor’s diploma in Pc Science and Bioinformatics. Niithiyn works carefully with the Generative AI GTM staff to allow AWS prospects on a number of fronts and speed up their adoption of generative AI. He’s an avid fan of the Dallas Mavericks and enjoys gathering sneakers.
Avan Bala is a Options Architect at AWS. His space of focus is AI for DevOps and machine studying. He holds a Bachelor’s diploma in Pc Science with a minor in Arithmetic and Statistics from the College of Maryland. Avan is at present working with the Enterprise Engaged East Workforce and likes to specialise in initiatives about rising AI expertise. When not working, he likes to play basketball, go on hikes, and take a look at new meals across the nation.
Dr. Farooq Sabir is a Senior Synthetic Intelligence and Machine Studying Specialist Options Architect at AWS. He holds PhD and MS levels in Electrical Engineering from the College of Texas at Austin and an MS in Pc Science from Georgia Institute of Know-how. He has over 15 years of labor expertise and likewise likes to show and mentor school college students. At AWS, he helps prospects formulate and clear up their enterprise issues in knowledge science, machine studying, pc imaginative and prescient, synthetic intelligence, numerical optimization, and associated domains. Primarily based in Dallas, Texas, he and his household like to journey and go on lengthy highway journeys.
Hemant Singh is an Utilized Scientist with expertise in Amazon SageMaker JumpStart. He acquired his grasp’s from Courant Institute of Mathematical Sciences and B.Tech from IIT Delhi. He has expertise in engaged on a various vary of machine studying issues throughout the area of pure language processing, pc imaginative and prescient, and time sequence evaluation.

