TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Geniusrise – inference APIs for text, vision, audio, multi-modal AI models

3 点作者 ixaxaar超过 1 年前

1 comment

ixaxaar超过 1 年前
Geniusrise is a modular, loosely-coupled AI-microservices framework.<p>It can be used to perform various tasks, including hosting inference endpoints, performing bulk inference, fine tune etc with open source models or closed source APIs.<p>- The framework provides structure for modules and operationalizes and orchestrates them. - The modular ecosystem provides a layer of abstraction over the myriad of models, libraries, tools, parameters and optimizations underlying the operationalization of modern AI models.<p>1. Install geniusrise and libs<p><pre><code> pip install torch pip install geniusrise pip install geniusrise-vision # vision multi-modal models pip install geniusrise-text # text models, LLMs pip install geniusrise-audio # audio models </code></pre> 2. Create YAML file<p><pre><code> version: &#x27;1&#x27; bolts: my_multimodal_api: name: VisualQAAPI state: type: none input: type: batch args: input_folder: .&#x2F;input output: type: batch args: output_folder: .&#x2F;output method: listen args: model_name: &#x27;llava-hf&#x2F;bakLlava-v1-hf&#x27; model_class: &#x27;LlavaForConditionalGeneration&#x27; processor_class: &#x27;AutoProcessor&#x27; device_map: &#x27;cuda:0&#x27; use_cuda: True precision: &#x27;bfloat16&#x27; quantization: 0 max_memory: None torchscript: False compile: False flash_attention: False better_transformers: False endpoint: &#x27;*&#x27; port: 3000 cors_domain: &#x27;http:&#x2F;&#x2F;localhost:3000&#x27; username: &#x27;user&#x27; password: &#x27;password&#x27; </code></pre> 3. Launch API service<p><pre><code> genius rise MY_IMAGE=&#x2F;path&#x2F;to&#x2F;test&#x2F;image (base64 -w 0 $MY_IMAGE | awk &#x27;{print &quot;{\&quot;image_base64\&quot;: \&quot;&quot;$0&quot;\&quot;, \&quot;question\&quot;: \&quot;&lt;image&gt;\nUSER: Whats the content of the image?\nASSISTANT:\&quot;, \&quot;do_sample\&quot;: false, \&quot;max_new_tokens\&quot;: 128}&quot;}&#x27; &gt; &#x2F;tmp&#x2F;image_payload.json) curl -X POST http:&#x2F;&#x2F;localhost:3000&#x2F;api&#x2F;v1&#x2F;answer_question \ -H &quot;Content-Type: application&#x2F;json&quot; \ -u user:password \ -d @&#x2F;tmp&#x2F;image_payload.json | jq </code></pre> More: <a href="https:&#x2F;&#x2F;docs.geniusrise.ai&#x2F;guides&#x2F;usage&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.geniusrise.ai&#x2F;guides&#x2F;usage&#x2F;</a> and <a href="https:&#x2F;&#x2F;github.com&#x2F;geniusrise&#x2F;examples">https:&#x2F;&#x2F;github.com&#x2F;geniusrise&#x2F;examples</a>