Skip to main content

Asistente de IA Local : Desplegar Ollama y AnytingLLM en Jetson

Introducción

El Asistente de IA Local es una aplicación de inteligencia artificial que se ejecuta en hardware y software local, ofreciendo capacidades de interacción inteligente y procesamiento de datos. Opera independientemente de los servicios en la nube, protegiendo la privacidad del usuario mientras proporciona tiempos de respuesta rápidos y altos niveles de personalización.

En este wiki, demostraremos cómo configurar una base de conocimiento local en dispositivos Jetson con ollama y AnythingLLM. Aprovechando las poderosas capacidades de los modelos de lenguaje grandes, nuestro objetivo es mejorar nuestra eficiencia de trabajo.

Prerrequisitos

  • Dispositivo Jetson con más de 16GB de memoria.
  • El dispositivo de hardware necesita estar pre-flasheado con el sistema operativo jetpack 5.1.1.
note

En este wiki, lograremos las siguientes tareas usando el NVIDIA® Jetson AGX Orin™ 64GB Developer Kit, pero también puedes intentar usar otros dispositivos Jetson.

Comenzando

Conexión de Hardware

  • Conecta el dispositivo Jetson a la red, ratón, teclado y monitor.
note

Por supuesto, también puedes acceder remotamente al dispositivo Jetson vía SSH a través de la red local.

Instalar y Ejecutar Ollama

Aquí, recomendamos encarecidamente usar jetson-examples para desplegar rápidamente Ollama en tu dispositivo Jetson.

Paso1. Abre una terminal en el dispositivo jetson y ejecuta el siguiente comando para instalar jetson-examples:

sudo apt install python3-pip
pip3 install jetson-examples

Paso2. Para desplegar ollama en el dispositivo Jetson con un solo comando, podemos ejecutar:

reComputer run ollama

Paso3. Descarga el modelo grande Llama3 usando Ollama:

ollama run llama3
info

Por favor mantén esta terminal activa.

Instalar y Ejecutar AnythingLLM

Podemos instalar convenientemente AnythingLLM usando una configuración local de Docker.

Paso1. Ejecutar AnythingLLM en Jetson.

Reabre la terminal e ingresa el siguiente comando:

docker pull mintplexlabs/anythingllm

export STORAGE_LOCATION=$HOME/anythingllm
mkdir -p $STORAGE_LOCATION
touch "$STORAGE_LOCATION/.env"
docker run -d -p 3001:3001 --cap-add SYS_ADMIN \
-v ${STORAGE_LOCATION}:/app/server/storage \
-v ${STORAGE_LOCATION}/.env:/app/server/.env \
-e STORAGE_DIR="/app/server/storage" \
mintplexlabs/anythingllm

Paso2. Configura tu propia base de conocimiento local.

Para acceder a la aplicación completa, visita http://<jetson-ip>:3001 en tu navegador.

note

Puedes ingresar el comando ifconfig en la terminal de Jetson para encontrar su dirección IP.

Sigue las indicaciones en pantalla para completar la configuración de AnythingLLM.

danger

Ten en cuenta que en la página de configuración de LLM Perference, debemos seleccionar el modelo de lenguaje grande Llama 3.1 de Ollama.

Finalmente, importa los documentos necesarios. El modelo de lenguaje grande entonces responderá preguntas basándose en los documentos importados.

import --> click to upload or drag and drop --> select document --> move to Workspace --> save and embed

En este punto, has configurado exitosamente tu propia base de conocimiento local.

note

Para tutoriales de configuración más profundos, por favor consulta este enlace.

Ejecutémoslo

Ingresa preguntas en el cuadro de diálogo, y el modelo de lenguaje grande proporcionará respuestas basadas en la base de conocimiento.

story1.txt
Once upon a time in a quaint village nestled between rolling hills, there was a young girl named Eliza who loved to explore the woods behind her home. The forest was a magical place, filled with tall trees that whispered secrets, streams that sang soft melodies, and flowers that seemed to glow under the moonlight.

One sunny morning, Eliza set out on one of her adventures, her heart brimming with excitement. As she wandered deeper into the forest, she discovered a hidden path she had never seen before. The path was lined with shimmering stones that sparkled like stars. Curious and intrigued, Eliza followed it.

After a short walk, the path led her to a magnificent clearing where a majestic oak tree stood in the center. At the base of the tree was a small, ornate door. It was covered in intricate carvings of animals and vines. Eliza, with her heart pounding with both excitement and nervousness, gently pushed the door open.

Inside, she found herself in a cozy, enchanted room. There were shelves lined with books and strange artifacts, and a warm fire crackling in a stone hearth. In the middle of the room, a wise old owl perched on a branch of a large, leafy plant.

The owl looked at Eliza with kind, knowing eyes. "Welcome, young traveler," it hooted softly. "I am Oliver, the guardian of this magical realm. Few people find their way here. You must have a special heart."

Eliza's eyes widened in awe. "What is this place?" she asked.

"This is the Realm of Wonders," Oliver explained. "It is a place where dreams come to life and where those with pure intentions can find their heart's true desire."

Eliza gazed around the room, her curiosity piqued. "What can I do here?"

Oliver smiled. "You can make a wish. But remember, wishes made here come with great responsibility. They have the power to change not just your life but the lives of those around you."

Eliza thought long and hard. She remembered how her village had been struggling with drought and how her friends and family were suffering. With a determined look, she made her wish.

"I wish for rain to fall upon my village and bring life back to the land."

Oliver nodded approvingly. "A selfless wish. It will be granted."

The next morning, as Eliza returned to her village, dark clouds gathered in the sky, and a gentle rain began to fall. The villagers looked up in amazement as the parched earth drank in the life-giving water. The fields began to turn green, and the village flourished once more.

Eliza's heart swelled with joy as she realized the impact of her wish. The Realm of Wonders had given her the chance to make a difference, and she learned that true magic comes from caring for others.

From that day on, Eliza continued to explore the woods, knowing that the true wonders of life were found in kindness and selflessness.

And so, the village thrived, and Eliza's adventures became the stuff of legends, reminding everyone that magic, indeed, begins with a kind heart.

Demostración del Efecto

Aquí, usamos el asistente personal local configurado para consultar la información que necesitamos.

Referencias

Soporte Técnico y Discusión de Productos

¡Gracias por elegir nuestros productos! Estamos aquí para proporcionarte diferentes tipos de soporte para asegurar que tu experiencia con nuestros productos sea lo más fluida posible. Ofrecemos varios canales de comunicación para atender diferentes preferencias y necesidades.

Loading Comments...