Even as PaLM 2 is more capable, it’s also faster and more efficient than previous models — and it comes in a variety of sizes, which makes it easy to deploy for a wide range of use cases. PaLM 2 is available in four sizes, from smallest to largest: Gecko, Otter, Bison, and Unicorn. Gecko is so lightweight that it can work on mobile devices and is fast enough for great interactive applications on-device, even when offline. This versatility means PaLM 2 can be fine-tuned to support entire classes of products in more ways, to help more people.
Gecko: The smallest and lowest cost model for simple tasks
Code-gecko
Code-gecko is the name of the model that supports code completion. It's a foundation model that generates code based on the code being written. code-gecko completes code that was recently typed by a user. code-gecko is supported by the code generation API.
Use cases
Some common use cases for code generation are:
Write code faster: Use the code-geckomodel to write code faster by taking advantage of code suggested for you.
Prompt:
def calculate_average(data):
total_sum = 0
for num in data:
total_sum += num
average =
Response:
total_sum / len(data) return average
Prompt: def factorial(n):
Response:
if n == 0: return 1 else: return n * factorial(n - 1)
Minimize bugs in code: Use code suggestions that you know are syntactically correct to avoid errors. Code completion helps you minimize the risk of accidentally introducing bugs that can occur when you write code quickly.
prompt:
file = open("data.txt", "r"
Response:
)
data = json.load(file)
file.close()
return data
prompt:
def bubble_sort(lst):
n = len(lst)
Response:
for i in range(n-1): for j in range(n-i-1):
if lst[j] > lst[j+1]:
lst[j], lst[j+1] = lst[j+1], lst
Disclaimer
Please be advised that this model utilizes wrapped Artificial Intelligence (AI) provided by GCP (the "Vendor"). These AI models may collect, process, and store data as part of their operations. By using our website and accessing these AI models, you hereby consent to the data practices of the Vendor.
We do not have control over the data collection, processing, and storage practices of the Vendor. Therefore, we cannot be held responsible or liable for any data handling practices, data loss, or breaches that may occur.
It is your responsibility to review the privacy policies and terms of service of the Vendor to understand their data practices. You can access the Vendor's privacy policy and terms of service at https://cloud.google.com/privacy.
We disclaim all liability with respect to the actions or omissions of the Vendor, and we encourage you to exercise caution and to ensure that you are comfortable with these practices before utilizing the AI models hosted on our site.
ID
Model Type ID
Text To Text
Input Type
text
Output Type
text
Description
A LLM model fine-tuned to suggest code completion based on the context in code that's written.