-
Notifications
You must be signed in to change notification settings - Fork 6
Getting started with Gemini
(Image credit: Google DeepMind, Unsplash.com)
Description: Google AI's Gemini is a versatile large language model (LLM) capable of handling a wide range of tasks—from creative writing to informative summarization. Trained on an extensive dataset of text and code, Gemini excels at understanding and responding to complex prompts and questions.
Development History: Gemini's creation has been a collaborative effort among Google AI researchers from various fields. The model has evolved through multiple iterations, each building upon its predecessor's strengths.
Model Sizes: Gemini is available in various sizes, each with unique capabilities and computational needs. Larger models boast more parameters and can tackle more complex tasks but require greater resources.
Uses: Gemini's applications are diverse, including:
- Natural language generation: Crafting creative text, composing emails, and producing code.
- Question answering: Delivering informative summaries and addressing complex queries.
- Translation: Rendering text across different languages.
- Summarization: Distilling lengthy documents into concise summaries.
- Recognize: Can recognize objects and text in images.
- Understand: Can understand and recognize images, enabling it to parse complex visuals, such as charts and figures.
- Code generation: Creating code from natural language descriptions.
Limitations: Despite its power, Gemini has important limitations:
- Hallucinations: Occasional generation of inaccurate or misleading information.
- Bias: Potential reflection of biases present in its training data.
- Computational demands: Larger models can be resource-intensive to operate.
Official Google Resources:
- Google AI Blog: Features articles and updates on Gemini and other Google AI projects.
- Google AI for Developers: Provides detailed information on using the Gemini API and integrating it into applications.
- Gemini models: Learn about LLMs, Gemini models, and Vertex AI.
Research Papers and Preprints:
- Google AI Research: Offers published papers and preprints on Gemini, including in-depth technical details about its architecture and training.
Hugging Face:
- Model Hub: Hosts pre-trained Gemini models, including community-created and task-specific fine-tuned versions.
Note
📔 Read and execute the next Jupyter Notebook in Google Colab for this session.
import requests
def query_gemini(prompt):
url = "https://api.gemini.google.com/v1/models/gemini-1.5/generate"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
data = {"prompt": prompt}
response = requests.post(url, headers=headers, json=data)
return response.json()
prompt = "Write a poem about a robot who dreams of becoming a chef."
response = query_gemini(prompt)
print(response)
Created: 10/15/2024 (C. Lizárraga); Last update: 10/17/2024 (C. Lizárraga)
UArizona DataLab, Data Science Institute, University of Arizona, 2024.
UArizona DataLab, Data Science Institute, University of Arizona, 2025.
Fall 2024
- Introduction to NLP with Hugging Face Transformers
- Computer Vision with Hugging Face Transformers
- Multimodal LLM with Hugging Face Transformers
- Running LLM locally: Ollama
- Introduction to Langchain
- Getting started with Phi-3
- Getting started with Gemini/Gemma
- Introduction to Gradio
- Introduction to Retrieval Augmented Generation (RAG)
Spring 2025