logo
Menu
Probando Modelos Bedrock Text G1 de Amazon Bedrock (Lite vs Express)

Probando Modelos Bedrock Text G1 de Amazon Bedrock (Lite vs Express)

En reInvent 2023, Amazon anunció la disponibilidad general de los Modelos Bedrock Text G1. Probé ambos para ver cómo generan texto y código, y cuál de ellos se desempeña mejor.

Published Jan 17, 2024
Intro
Amazon lanzó sus propios LLMs en reInvent 2023, incluyendo los LLMs G1 para generación de texto Titan Lite y Express. La principal diferencia es que el modelo Lite tiene una longitud de contexto de 4000 tokens, mientras que Express tiene una longitud de contexto de hasta 8000, haciéndolo más robusto. Aunque el modelo Lite tiene algunos beneficios de costo, se espera que la versión Express pueda generar respuestas mejores. Los probé a ambos para ver como funcionan.
Precio
Los precios de Bedrock se miden en la cantidad de "tokens" que entran y salen del modelo. En modelos de texto como Titan, esto está de alguna manera relacionado con la cantidad de palabras que entran y salen de él.
El modelo Lite actualmente cuesta $0.0003 por 1,000 tokens de entrada y $0.0008 por 1,000 tokens de salida, mientras que el modelo Express cuesta $0.0006 por 1,000 tokens de entrada y $0.0016 por 1,000 tokens de salida.
Acceso
Antes de poder usarlos, debes solicitar acceso. En la sección "Model Access" dentro de la consola de servicios BedRock, haz clic en "Manage Model Access", selecciona los modelos a los que necesitas acceso y haz clic en el botón "Save Changes".
Model Access screen
Puede llevar un par de minutos obtener acceso a los modelos. Para algunos modelos que no son proporcionados por Amazon, puede llevar varios días o semanas, ya que el acceso debe ser aprobado por el proveedor del modelo.
Generación de Texto
Para probar la salida de ambos modelos, utilicé el siguiente texto de entrada: 'Generate a text for a marketing campaign for a new Shampoo called "Lambda"'.. Esta es la salida que generaron:
Lite:
"Introducing Lambda Shampoo, the ultimate solution for hair that looks and feels its best! Say goodbye to dull, lifeless locks and hello to vibrant, healthy-looking hair with Lambda Shampoo. Formulated with a blend of natural ingredients, Lambda Shampoo is designed to nourish, strengthen, and revitalize your hair from root to tip. Experience the power of botanical extracts, vitamins, and proteins that work in harmony to restore your hair's natural balance and restore its natural shine. Lambda Shampoo is suitable for all hair types, including color-treated hair, and is free from harsh chemicals and sulfates that can strip away natural moisture and damage your hair. It's gentle enough for daily use and leaves your hair feeling soft, smooth, and manageable. But that's not all! Lambda Shampoo comes in an attractive and eco-friendly packaging that reflects our commitment to sustainability. We believe in reducing our environmental footprint and doing our part to protect the planet. Join the Lambda Movement and experience the difference for yourself. Visit our website or find our shampoo at your nearest retailer to get started on your hair care journey today! #LambdaShampoo #HairRevitalization #NourishAndStrength #BotanicalExtracts #HealthyHair #SustainablePackaging"
Express:
"Lambda Shampoo: The Ultimate Hair Transformation Experience Introducing the revolutionary Lambda Shampoo, the game-changer in hair care that will transform your locks into a breathtaking masterpiece. Say goodbye to ordinary hair and hello to extraordinary beauty with Lambda's cutting-edge formula. Unlock the Power of Natural Ingredients: Lambda Shampoo is crafted with a blend of premium, natural ingredients that have been carefully selected to nourish, strengthen, and enhance your hair's natural beauty. Our formula contains a powerful combination of botanical extracts, vitamins, and antioxidants that work synergistically to promote healthy hair growth, improve scalp health, and restore shine and vitality. Revitalize Your Hair from Root to Tip: Lambda Shampoo is designed to revitalize your hair from root to tip. Our deep cleansing formula gently removes impurities, excess oil, and product buildup, leaving your hair feeling clean, refreshed, and revitalized. With regular use, you'll notice a noticeable improvement in hair texture, volume, and overall hair health. Silky Smooth and Frizz-Free: Say goodbye to frizzy, unruly hair and hello to silky, smooth locks. Lambda Shampoo contains nourishing ingredients that help to tame frizz and impart a lustrous shine to your hair. Experience the joy of running your fingers through hair that feels incredibly soft and manageable. Customized Hair Care for Every Need: Lambda Shampoo offers a range of customized hair care solutions to suit your individual needs. Whether you have dry, damaged hair, oily scalp, or color-treated hair, we have a formula that will address your specific concerns and deliver the desired results. Choose from our variety of scents, including refreshing citrus, soothing lavender, and invigorating mint, to add a touch of luxury to your hair care routine. Sustainable and Eco-Friendly: At Lambda, we are committed to sustainability and eco-friendliness. Our shampoo bottles are made from recycled materials, and our packaging is designed to minimize waste. By choosing Lambda Shampoo, you're not only taking care of your hair but also contributing to a greener and more sustainable future. Join the Lambda Hair Transformation Movement: Experience the transformative power of Lambda Shampoo and join the thousands of satisfied customers who have already embraced this hair care revolution. Elevate your hair care routine and unlock your hair's true potential with Lambda. Visit our website or your nearest retailer to discover the full range of Lambda Shampoo and experience the difference for yourself. Get ready to turn heads with your stunning, healthy hair. Lambda Shampoo: Where Science Meets Beauty, and Your Hair Becomes a Work of Art."
Ambos textos son útiles para campañas de marketing. Vale la pena señalar que el modelo Lite generó texto casi de inmediato, mientras que el modelo Express tardó unos segundos en generarse. Si no necesitas generar texto extenso para este tipo de tareas, entonces la versión Lite debería ser suficiente.
Me alegra que ninguno de los modelos haya devuelto una alucinación sobre AWS Lambda!
Generación de Código
Probé algunas cosas. Primero, intenté."Generate a Python function that receives an array of numbers, and returns the biggest number" (Generar una función en Python que reciba una matriz de números y devuelva el número más grande), lo cual funcionó bastante bien para ambos modelos, devolviendo este código:
Sin embargo, cuando intenté hacer algo un poco más complejo, como Generate a Python function that receives an array of numbers, sorts it from min to max and returns the biggest number" (Generar una función en Python que reciba una matriz de números, la ordene de menor a mayor y devuelva el número más grande), obtuve un error que decía "Sorry - this model is unable to respond to this request." (Lo siento, este modelo no puede responder a esta solicitud)
Cuando lo intenté con la versión Express, generó código (muy similar al anterior) pero no realizó la parte de ordenar.
Ambos modelos pueden generar código simple, pero es mejor depender de otros servicios como CodeWhisperer para tareas complejas. Probé este mismo prompot con otros LLMs disponibles en BedRock, como Cohere Command o A21 Jurassic, pero ambos fallaron en generar una buena función.
Conclusión
Las pruebas de generación de texto mostraron que ambos modelos producen contenido convincente para campañas de marketing, siendo la versión Lite más rápida en responder y la versión Express tardando unos segundos más pero ofreciendo una salida más detallada. Los usuarios que buscan tareas más cortas de generación de texto pueden encontrar suficiente la versión Lite para sus necesidades.
En cuanto a la generación de código, ambos modelos pueden manejar solicitudes simples de manera efectiva. Sin embargo, las limitaciones se hicieron evidentes al enfrentarse a tareas más complejas, como ordenar una matriz de números. El modelo Lite no respondió a la solicitud, mientras que la versión Express generó código pero omitió la parte de ordenar el vector. Esto sugiere que depender de servicios especializados como CodeWhisperer puede ser más efectivo para tareas de codificación complejas.
En esencia, la elección entre Titan Lite y Express depende de los requisitos específicos de la tarea en cuestión. Para tareas más cortas de generación de texto con consideraciones de presupuesto, el modelo Lite puede ser una opción adecuada. Sin embargo, el modelo Express sería una mejor elección para tareas más extensas.
 

Comments