Claude Code + Gemma 4 --> local and free

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 44508
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 717 times
Been thanked: 311 times
Contact:

Claude Code + Gemma 4 --> local and free

Post by Antonio Linares »

  1. download Ollama from:

https://ollama.com/

  1. From Ollama app download gemma4:e4b

  2. Create a Modelfile file with these contents: (we increase the context up to 32K)

    Code: Select all | Expand

    FROM gemma4:e4b
    PARAMETER num_ctx 32768
  3. ollama create gemma4-e4b-32k -f Modelfile

  4. ollama launch claude --model gemma4-e4b-32k

  5. From Claude Code do /permissions and select 1. Add a new rule... then write: Bash(ls:*)

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 44508
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 717 times
Been thanked: 311 times
Contact:

Re: Claude Code + Gemma 4 --> local and free

Post by Antonio Linares »

If you have enough harddisk space for it then use:

gemma4:26b

Modelfile

Code: Select all | Expand

FROM gemma4:26b
PARAMETER num_ctx 32768

ollama launch claude --model gemma4-26b-32k

same process as above :idea:

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 44508
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 717 times
Been thanked: 311 times
Contact:

Re: Claude Code + Gemma 4 --> local and free

Post by Antonio Linares »

Image

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 44508
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 717 times
Been thanked: 311 times
Contact:

Re: Claude Code + Gemma 4 --> local and free

Post by Antonio Linares »

Very far away from the real Claude Code experience...

Muy lejos de la verdadera experiencia con Claude Code...

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 44508
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 717 times
Been thanked: 311 times
Contact:

Re: Claude Code + Gemma 4 --> local and free

Post by Antonio Linares »

https://aitoolanalysis.com/claude-code-router-review/

You type in Claude Code → CCR intercepts → Routes to DeepSeek/Gemini/Ollama/etc. → Response transformed → Appears in Claude Code

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 44508
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 717 times
Been thanked: 311 times
Contact:

Re: Claude Code + Gemma 4 --> local and free

Post by Antonio Linares »

Claude Code + DeepSeek:

Code: Select all | Expand

export ANTHROPIC_BASE_URL="https://api.deepseek.com/anthropic"
export ANTHROPIC_AUTH_TOKEN="tu_clave_api_aquí"
export ANTHROPIC_MODEL="deepseek-chat"
# Opcional: define el modelo secundario para tareas ligeras
export ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-chat"

claude

Code: Select all | Expand

export ANTHROPIC_BASE_URL="https://api.deepseek.com/anthropic"
export ANTHROPIC_AUTH_TOKEN="tu_clave_api_aquí"
export ANTHROPIC_MODEL="deepseek-reasoner"
# Importante: Aumenta el tiempo de espera porque R1 tarda en "pensar"
export API_TIMEOUT_MS=600000 

claude
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply