Skip to content

Commit

Permalink
Site updated: 2024-05-23 16:29:36
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaozhiming committed May 23, 2024
1 parent 167bce0 commit c0ba13d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions 2024/01/18/rerank-model-deploy-and-usage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ <h3 id="Text-Embedding-Inherence"><a href="#Text-Embedding-Inherence" class="hea
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">curl --proto <span class="string">&#x27;=https&#x27;</span> --tlsv1.2 -sSf https://sh.rustup.rs | sh</span><br></pre></td></tr></table></figure>

<p>然后下载 TEI 的 github 仓库,并安装相关依赖,命令如下:</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/huggingface/text-embeddings-inference.git</span><br><span class="line"><span class="built_in">cd</span> text--embeddings-inference</span><br><span class="line">cargo install --path router -F candle -F metal</span><br></pre></td></tr></table></figure>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/huggingface/text-embeddings-inference.git</span><br><span class="line"><span class="built_in">cd</span> text-embeddings-inference</span><br><span class="line">cargo install --path router -F candle -F metal</span><br></pre></td></tr></table></figure>

<ul>
<li>其中 router 是 TEI 仓库里面的一个目录</li>
<li>安装成功后,可以使用<code>text-embeddings-router --help</code>命令来查看工具的相关参数</li>
</ul>
<p>TEI 安装完成后,我们使用它来部署 Rerank 模型,命令如下:</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">text-embeddings-router --model-id BAAI/bge-reranker-large --revision refs/pr/5 --port 8080</span><br></pre></td></tr></table></figure>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">text-embeddings-router --model-id BAAI/bge-reranker-large --revision refs/pr/4 --port 8080</span><br></pre></td></tr></table></figure>

<ul>
<li><code>--model-id</code>是指模型在 Huggingface 上的 ID,<code>revision</code>是相关的版本号</li>
Expand Down
Loading

0 comments on commit c0ba13d

Please sign in to comment.