<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Litellm on Ricky</title><link>https://linzeyan.github.io/categories/litellm/</link><description>Recent content in Litellm on Ricky</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Mon, 01 Jun 2026 10:58:17 +0800</lastBuildDate><atom:link href="https://linzeyan.github.io/categories/litellm/index.xml" rel="self" type="application/rss+xml"/><item><title>Local LLM on MacBookPro</title><link>https://linzeyan.github.io/posts/2026/20260601-local-llm/</link><pubDate>Mon, 01 Jun 2026 10:58:17 +0800</pubDate><guid>https://linzeyan.github.io/posts/2026/20260601-local-llm/</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="https://huggingface.co/mlx-community" target="_blank" rel="noopener"&gt;https://huggingface.co/mlx-community&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ml-explore/mlx-lm" target="_blank" rel="noopener"&gt;https://github.com/ml-explore/mlx-lm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jundot/omlx" target="_blank" rel="noopener"&gt;https://github.com/jundot/omlx&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="install"&gt;Install&lt;/h4&gt;
&lt;div class="code-block" data-code-block&gt;&lt;div class="code-block-full" id="code-block-09fee35c334dfb7f456563c5be358100-0"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# install hf&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;uv tool install &lt;span class="s2"&gt;&amp;#34;huggingface_hub&amp;#34;&lt;/span&gt; --with hf-xet --upgrade
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;hf auth login
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;hf auth whoami
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# install mlx_lm&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;uv tool install --force &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; --from &lt;span class="s1"&gt;&amp;#39;git+https://github.com/ml-explore/mlx-lm.git@refs/pull/1192/head&amp;#39;&lt;/span&gt; mlx-lm &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; --with &lt;span class="s1"&gt;&amp;#39;transformers @ git+https://github.com/huggingface/transformers.git&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# install mlx-openai-server&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;uv pip install git+https://github.com/cubist38/mlx-openai-server.git --system
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# install [litellm](https://github.com/BerriAI/litellm)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;uv tool install &lt;span class="s1"&gt;&amp;#39;litellm[proxy]&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# install [claw-code](https://github.com/ultraworkers/claw-code)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cargo install agent-code
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;script type="application/json" class="code-block-data"&gt;{"copyButton":true,"expanded":false,"labels":{"code":"Code","copied":"Copied!","copy":"Copy","copyError":"Copy failed. Try again.","showAll":"Show all {count} lines","showLess":"Show fewer lines"},"language":"","preview":"","source":"# install hf\nuv tool install \"huggingface_hub\" --with hf-xet --upgrade\nhf auth login\nhf auth whoami\n\n# install mlx_lm\nuv tool install --force \\\n --from 'git+https://github.com/ml-explore/mlx-lm.git@refs/pull/1192/head' mlx-lm \\\n --with 'transformers @ git+https://github.com/huggingface/transformers.git'\n\n# install mlx-openai-server\nuv pip install git+https://github.com/cubist38/mlx-openai-server.git --system\n\n# install [litellm](https://github.com/BerriAI/litellm)\nuv tool install 'litellm[proxy]'\n\n# install [claw-code](https://github.com/ultraworkers/claw-code)\ncargo install agent-code\n","title":"shell"}&lt;/script&gt;&lt;/div&gt;&lt;h4 id="download-model"&gt;Download Model&lt;/h4&gt;
&lt;div class="code-block" data-code-block&gt;&lt;div class="code-block-full" id="code-block-09fee35c334dfb7f456563c5be358100-1"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;HF_HUB_DISABLE_XET&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt; hf download mlx-community/DeepSeek-V4-Flash-4bit &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; --local-dir deepseekV4 --repo-type model
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;script type="application/json" class="code-block-data"&gt;{"copyButton":true,"expanded":false,"labels":{"code":"Code","copied":"Copied!","copy":"Copy","copyError":"Copy failed. Try again.","showAll":"Show all {count} lines","showLess":"Show fewer lines"},"language":"","preview":"","source":"HF_HUB_DISABLE_XET=1 hf download mlx-community/DeepSeek-V4-Flash-4bit \\\n --local-dir deepseekV4 --repo-type model\n","title":"shell"}&lt;/script&gt;&lt;/div&gt;&lt;h4 id="run-server"&gt;Run Server&lt;/h4&gt;
&lt;div class="code-block" data-code-block&gt;&lt;div class="code-block-full" id="code-block-09fee35c334dfb7f456563c5be358100-2"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;mlx_lm.server --model /Users/ricky/git/mlx/deepseekV4 --port &lt;span class="m"&gt;8080&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;script type="application/json" class="code-block-data"&gt;{"copyButton":true,"expanded":false,"labels":{"code":"Code","copied":"Copied!","copy":"Copy","copyError":"Copy failed. Try again.","showAll":"Show all {count} lines","showLess":"Show fewer lines"},"language":"","preview":"","source":"mlx_lm.server --model /Users/ricky/git/mlx/deepseekV4 --port 8080\n","title":"shell"}&lt;/script&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;or&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>