top of page

Gino News

quarta-feira, 29 de janeiro de 2025

Criando um Endpoint API do Qwen 2.5 VL com Hugging Face e Docker

Tecnologia Inteligência Artificial Desenvolvimento

Em um cenário onde os modelos Vision-Language ganham destaque, um guia prático ensina como construir um endpoint de API para o modelo Qwen2.5-VL-7B-Instruct utilizando Hugging Face Spaces e Docker, permitindo a integração de imagens e textos em uma única chamada.

A 2D, flat, vectorial image in corporate style, demonstrating the integration of Vision-Language models taking the limelight in the modern tech scene. The picture depicts a computer screen displaying the High-Fidelity Face platform interface. The project code stands out prominently within the interface, showing the implementation of an API endpoint for a theoretical model named 'Qwen2.5-VL-7B-Instruct'. The scene leverages the use of Docker, aiming to incorporate both image and text in a single API call. The image has a bright white, texture-free background. The elements are colored vibrantly to emphasize the cutting edge technology in play. The emblem of High-Fidelity Face, subtly placed, reinforces the source of the technology.

Imagem gerada utilizando Dall-E 3

Os modelos de linguagem e visão estão revolucionando a forma como interagimos com a tecnologia, mas ainda não havia uma implementação API-ready do Qwen2.5-VL. Este guia visa oferecer um passo a passo para criar um protótipo funcional, hospedando o modelo no Hugging Face Spaces, e utilizando Docker para facilitar a implementação.


O processo de criação do espaço começa na plataforma Hugging Face, onde o usuário deve configurar um novo espaço com suporte para Docker. O guia destaca a importância de associar uma GPU para acelerar o processo de inferência. Após a configuração, o próximo passo envolve escrever um servidor FastAPI que irá expor um endpoint para receber uma URL da imagem e um texto prompt, processando-os com o modelo Qwen2.5-VL.


No guia, são apresentados códigos necessários, incluindo o código do servidor FastAPI e o Dockerfile para instalação de dependências. Após definir o ambiente, o usuário pode testar a API através de exemplos usando curl ou Python, que demonstram o funcionamento do endpoint e a geração de respostas baseadas na imagem e no prompt fornecidos.


  1. Configuração do espaço no Hugging Face.

  2. Escrita do servidor FastAPI.

  3. Construção do Dockerfile.

  4. Testes da API utilizando curl.

  5. Testes da API utilizando Python.


O guia conclui com sugestões de próximos passos, como adicionar uma interface front-end para interagir com a API e otimizar a inferência do modelo para melhorar a velocidade das respostas.


Dessa maneira, o artigo fornece um recurso valioso para desenvolvedores interessados em integrar modelos de linguagem e visão em suas aplicações. Para mais conteúdos técnicos e atualizações diárias no mundo da tecnologia e inteligência artificial, inscreva-se em nossa newsletter e fique por dentro das novidades.


FONTES:

    1. Hugging Face

    2. FastAPI

    3. Transformers

    4. Docker

    5. Qwen API Documentation

    REDATOR

    Gino AI

    29 de janeiro de 2025 às 23:48:01

    PUBLICAÇÕES RELACIONADAS

    Create an image in a 2D, linear perspective that visualizes a user interacting with a large-scale language model within a digital environment. The image should be in a vector-based flat corporate design with a white, textureless background. Display charts that show comparisons between performance metrics of Length Controlled Policy Optimization (LCPO) models and traditional methods. Also, include reasoning flows to illustrate the model's decision-making process. To symbolize the real-time application of the model in business operations, include elements of a digital environment. Use cool colors to convey a sense of advanced technology and innovation.

    Nova Técnica Revoluciona Otimização de Raciocínio em Modelos de Linguagem

    Depict a flat, corporate-style, vector image with a 2D linear perspective against a plain, white background showcasing the interface of a new Inference API by an artificial intelligence collective named Nous Research, based in New York. The interface should spotlight its features and developer interaction method. Include technology icons symbolizing innovation and growth charts representing Nous's evolution. Moreover, incorporate an illustration of a diverse team of developers: a black woman writing codes, a white man debugging, a Hispanic woman performing tests, and a Middle-Eastern man planning the next sprint. These diverse developers symbolize the community that will employ the API.

    Nous Research Lança API Revolucionária para Desenvolvedores de AI

    Imagine a 2D, vector-based scene in flat, corporate style. The background has a clean, texture-free white color, emphasizing the main elements of the image. In the center, we see detailed line graphs, bar graphs, and pie charts representing the shifting market shares between various AI companies in 2025. DALL-E's graph clearly displays a significant 80% decline, while Black Forest Labs stands out with some impressive, upward-trending performance charts, symbolizing its emergence as a leader in image generation. Bright and contrasting colors are used to differentiate the competition in the AI sector. Additional elements include abstract symbols of innovation, such as gears, light bulbs, and microchips, subtly scattered in the background to highlight the rapid evolution of AI tools.

    Mudanças Drásticas no Mercado de IA: DALL-E Enfrenta Queda e Black Forest Labs Surge em 2025

    Visualize an image in a 2D linear perspective, showcasing the intersection between technology and innovation. The image should ideally be in a corporate, flat, vector style with a white, textureless background. It must demonstrate the performance of a fictional AI model, 'QwQ-32B', with graphics juxtaposing its output with other AI models. Include distinctive technology icons such as clouds and gears, symbolizing advancements in machine learning and cloud computing. Utilize a colour palette primarily of blue and green hues to embody a sense of innovation and technology.

    QwQ-32B: O Novo Modelo de IA da Alibaba Revoluciona o Cenário dos Modelos de Raciocínio

    Fique por dentro das últimas novidades em IA

    Obtenha diariamente um resumo com as últimas notícias, avanços e pesquisas relacionadas a inteligência artificial e tecnologia.

    Obrigado pelo envio!

    logo genai

    GenAi Br © 2024

    • LinkedIn
    bottom of page