Outils pour utilisateurs

Outils du site


informatique:ai_coding

Ceci est une ancienne révision du document !


AI Coding

Coder avec une IA LLM.

Explications:

Autres pages:

Sur les perfs

Estimations

Devstral avec llama.cpp sur RTX 3060 12 Go.

by ChatGPT :

Modèle Contexte (seq_len) Batch_size recommandé Remarques
—————– —————— ——————— —————————————-
Devstral Small 7B 1024 4 Très sûr, VRAM ample
Devstral Small 7B 2048 2‑3 Bon compromis vitesse/VRAM
Devstral Small 7B 4096 1‑2 VRAM presque saturée
Devstral 13B 1024 2 VRAM limitée
Devstral 13B 2048 1‑2 Optimal, attention VRAM
Devstral 13B 4096 1 VRAM saturée, offload CPU conseillé
Devstral 13B 8192 1 Possible mais contexte long → risque OOM

by LeChat:

contexte (tokens) modèle (paramètres) VRAM estimée (Go) Batch size optimal Latence estimée (tok/s) Notes
512 7B ~5.5 8 15-25 Idéal pour des tâches courtes et rapides.
1024 7B ~6.0 4 10-20 Bon compromis pour des prompts moyens.
2048 7B ~7.0 2 5-15 Nécessite une gestion fine de la VRAM.
4096 7B ~8.5 1 3-10 Proche de la limite VRAM, risque de ralentissement.
512 13B ~9.0 4 8-15 Modèle plus gros, latence accrue.
1024 13B ~10.0 2 4-10 VRAM presque saturée, batch_size réduit.
2048 13B ~11.5 1 2-8 Risque élevé de dépassement VRAM, latence importante.

Online services

launch a opencode server :

opencode serve --port=30781 --print-logs --log-level DEBUG

Then prompt : “Explain async/await in JavaScript”

with:

time opencode run -m <ProviderId/ModelId> --attach=http://127.0.0.1:30781 --agent=plan "Explain async/await in JavaScript"

👾 Attention, les résultats peuvent être très différents:

  • d'une simple phrase de définition à un exemple de code
    • mais je n'ai pas modifier la taille du context, ce qui a une grande importance sur la taille/qualité de la réponse …
  • aussi, le system message prompt est sélectionné par opencode …
  • ovhcloud/Qwen3-Coder-30B-A3B-Instruct = 2,008s / 3,100s
  • ovhcloud/gpt-oss-20b = 14,219s / 21,714s
  • ovhcloud/Mistral-Nemo-Instruct-2407 = abandon après 7 minutes d'attente …
  • ovhcloud/DeepSeek-R1-Distill-Llama-70B = 22,301s / 29,187s
  • opencode/big-pickle = 2,858s / 3,479s
  • mistral-codestral/codestral-latest = 2,320s / 3,427s

Cartes IA

Hailo

Axelera

seeedstudio

Ollama & Nvidia Jetpack

Nvidia

A 10 A 30 A 40 A 100 SXM4 A 800 H 100 SMX5
Prix eBay $2,330 $3,999 $9,950 $4,000 $20,000 $20,000
Architecture Ampere Ampere Ampere Ampere Ampere Hopper
Code name GA102 GA100 GA102 GA100 GA100 GH100
Launch date 2021-04 2021-04 2020-10 2020-05 2022-11 2022-03
Maximum RAM 24 GB 24 GB 48 GB 40 GB 40 GB 96 GB
Memory type GDDR6 HBM2e GDDR6 HBM2e HBM2e HBM3
Memory bandwidth 600.2 GB/s 933.1 GB/s 695.8 GB/s 1555 GB/s 1.56 TB/s 1,681 GB/s
Memory bus width 384 bit 3072 bit 384 bit 5120 bit 5120 bit 5120 bit
Memory clock speed 1563 MHz 1215 MHz 1812 MHz 1215 MHz 1215 MHz 1313 MHz
Core clock speed 885 MHz 930 MHz 1305 MHz 1095 MHz 765 MHz 1837 MHz
Boost clock speed 1695 MHz 1440 MHz 1740 MHz 1410 MHz 1410 MHz 1665 MHz
Peak Half Precision (FP16) 31.24 TFLOPS (1:1) 10.32 TFLOPS (1:1) 37.42 TFLOPS (1:1) 77.97 TFLOPS (4:1)
Pipelines 9216 3584 10752 6912 6912 16896
Thermal Design Power 150 Watt 165 Watt 300 Watt 400 Watt 250 Watt 700 Watt
OpenCL 3.0 3.0 3.0 3.0

Cartes graphiques

Nvidia

gpu_bench

Adaptateur GPU externe

En anglais “GPU enclosures”. Nécessite un port Thunderbolt 3, 4 ou à venir 5.

egpu docks

Accelerating Machine Learning on a Linux Laptop with an External GPU by NVidia (Setting up Ubuntu to use NVIDIA eGPU)

eGPU

Models

Pour de l'assistance au code avec un GPU 16Go

Plan de test de comparaison :

Autres usages

Models servers

llama.cpp

https://github.com/ggml-org/llama.cpp

Lancer le serveur avec un modèle en local:

./bin/llama-server -m devstralQ5_K_M.gguf --port 8012 --jinja --ctx-size 20000
 
~/Code/bronx/AI_Coding/llama.cpp/build/bin/llama-server --port 8012 --chatml -m ~/Data/AI_Models/Qwen2.5-coder-7b-instruct-q8_0.gguf --ctx-size 48000

Quid des chat formats ? Est-ce lié au modèle ?

  • –jinja
  • –chatml

Modèles:

$ ./bin/llama-server --jinja -m ./Qwen3-Coder-30B-A3B-Instruct-Q5_K_S.gguf
llama_context: n_ctx_seq (4096) < n_ctx_train (262144) -- the full capacity of the model will not be utilized

Avec GPU

Il faut le compiler avec CUDA. Avec une version >= 11.7 pour compatibilité syntaxe.

J'ai installé CUDA le dépot Nvidia Cuda et cuda toolkit 13

$ sudo cat /etc/apt/sources.list.d/cuda-ubuntu2404-x86_64.list
deb [signed-by=/usr/share/keyrings/cuda-archive-keyring.gpg]
 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/ /

et aussi

export PATH=$PATH:/usr/local/cuda-13.0/bin/

Ensuite une très très longue compilation :

DCMAKE_CUDA_ARCHITECTURES: 86 pour RTX 3060 et 120 pour RTX 5060.

# CUDA GPU Compute Capability https://developer.nvidia.com/cuda-gpus
# RTX 3060 : 86
# RTX 5060 : 120
$ cmake -B build -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES="86;120" \
 -DCMAKE_CUDA_COMPILER=/usr/local/cuda-12.9/bin/nvcc -DCMAKE_INSTALL_RPATH="/usr/local/cuda-12.9/lib64;\$ORIGIN" -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON

-- ccache found, compilation results will be cached. Disable with GGML_CCACHE=OFF.
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- GGML_SYSTEM_ARCH: x86
-- Including CPU backend
-- x86 detected
-- Adding CPU backend variant ggml-cpu: -march=native 
-- CUDA Toolkit found
-- Using CUDA architectures: 86;120
-- CUDA host compiler is GNU 13.3.0
-- Including CUDA backend
-- ggml version: 0.9.4
-- ggml commit:  6016d0bd4
-- Configuring done (0.5s)
-- Generating done (0.2s)
-- Build files have been written to: /home/cyrille/Code/bronx/AI_Coding/llama.cpp/build

$ cmake --build build --config Release

ollama

- https://ollama.com - https://github.com/ollama/ollama

Chat & build with open models

koboldcpp

vllm

NanoLLM

LiteLLM

Tabby ML

Coding assistant

Agentic Capabilities LLMs.

continue

Claude code

opencode

Les prompts system:

😩 Attention au contenu du fichier configuration opencode.json, la moindre erreur n'est pas signalée, mais pose des problèmes.

Essais de models

opencode models list les modèles disponibles sur les providers configurés. Bien pratique pour trouver le nom à mettre dans la config.

Modèles essayés avec opencode.

  • Big Pickle (opencode zen) : résultats impressionants ! Un vrai super assistant
  • Codestral (mistral free)
  • Qwen3-Coder-30B-A3B-Instruct (ovhcloud) : ça fonctionne mais juste le minimum
  • mistral-nemo-instruct-2407 (ovhcloud) : Pas de réponse
  • Mixtral-8x7B-Instruct-v0.1 (ovhcloud) : Bad request
  • Llama-3.1-8B-Instruct (ovhcloud) : Failed with “First, let me check the opencode documentation to see if there's any information about …”
  • Meta-Llama-3_3-70B-Instruct (ovhcloud) : Failed with “Unknown agent type: greeting-responder is not a valid agent type”

cline

codex-cli

Tabby

Gemini CLI

LLxprt Code

Windsurf

Amp Free

MCP server

Articles:

Serena

arabold/docs-mcp-server

context7

laravel boost

Dédié Php Laravel: https://laravel.com/ai/boost

Chrome DevTools MCP

https://github.com/ChromeDevTools/chrome-devtools-mcp/

chrome-devtools-mcp permet à votre agent de codage (tel que Gemini, Claude, Cursor ou Copilot) de contrôler et d'inspecter un navigateur Chrome en direct. Il agit comme un serveur MCP (Model-Context-Protocol), donnant à votre assistant de codage IA accès à toute la puissance de Chrome DevTools pour une automatisation fiable, un débogage approfondi et une analyse des performances.

LSP Server

system message

Exemple de system message pour un chatbot:

informatique/ai_coding.1764952436.txt.gz · Dernière modification : de cyrille

Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante : CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki