hello

llama4 돌려보기 (llama.cpp)

Share

rtx4090, rtx3090x2 으로 총 72GB 구성된 환경에서 아래 모델을 돌려봄.

방법은 https://docs.unsloth.ai/basics/tutorial-how-to-run-and-fine-tune-llama-4 참고

unsloth/Llama-4-Scout-17B-16E-Instruct-GGUF/Llama-4-Scout-17B-16E-Instruct-UD-IQ2_XXS.gguf
 ./llama.cpp/llama-cli     --model unsloth/Llama-4-Scout-17B-16E-Instruct-GGUF/Llama-4-Scout-17B-16E-Instruct-UD-IQ2_XXS.gguf     --threads 32     --ctx-size 16384     --n-gpu-layers 99       --seed 3407     --prio 3     --temp 0.6     --min-p 0.01     --top-p 0.9     -no-cnv     --prompt "<|header_start|>user<|header_end|>\n\nCreate a Flappy Bird game in Python. You must include these things:\n1. You must use pygame.\n2. The background color should be randomly chosen and is a light shade. Start with a light blue color.\n3. Pressing SPACE multiple times will accelerate the bird.\n4. The bird's shape should be randomly chosen as a square, circle or triangle. The color should be randomly chosen as a dark color.\n5. Place on the bottom some land colored as dark brown or yellow chosen randomly.\n6. Make a score shown on the top right side. Increment if you pass pipes and don't hit them.\n7. Make randomly spaced pipes with enough space. Color them randomly as dark green or light brown or a dark gray shade.\n8. When you lose, show the best score. Make the text inside the screen. Pressing q or Esc will quit the game. Restarting is pressing SPACE again.\nThe final game should be inside a markdown section in Python. Check your code for errors and fix them before the final markdown section.<|eot|><|header_start|>assistant<|header_end|>\n\n"

성능은

llama_perf_sampler_print:    sampling time =      59.52 ms /  1311 runs   (    0.05 ms per token, 22026.58 tokens per second)
llama_perf_context_print:        load time =   14681.95 ms
llama_perf_context_print: prompt eval time =     189.86 ms /   220 tokens (    0.86 ms per token,  1158.75 tokens per second)
llama_perf_context_print:        eval time =   19427.52 ms /  1090 runs   (   17.82 ms per token,    56.11 tokens per second)
llama_perf_context_print:       total time =   19829.90 ms /  1310 tokens
항목 수치
Sampling time 0.05 ms/token (22,026.58 tokens/s)
Prompt eval time 0.86 ms/token (1,158.75 tokens/s)
Eval time 17.82 ms/token (56.11 tokens/s)
Total time 약 19.8초 (1310 tokens)

이정도면 scout을 쓸만할거 같다.

내침김에 openai 서버로 실행시킴

# 로컬에서 이미 llama.cpp (gpu) 버전으로 빌드 했으니 

export LLAMA_CPP_LIB_PATH=/home/euno/git/llama.cpp/build/bin

git clone https://github.com/abetlen/llama-cpp-python.git
cd llama-cpp-python

CMAKE_ARGS="-DLLAMA_BUILD=OFF" pip install .
python3 -m llama_cpp.server \
  --model ./unsloth/Llama-4-Scout-17B-16E-Instruct-GGUF/Llama-4-Scout-17B-16E-Instruct-UD-IQ2_XXS.gguf \
  --host 0.0.0.0 \
  --port 8000 \
  --n_threads 32 \
  --n_ctx 16384 \
  --n_gpu_layers 99 \
  --seed 3407 \
  --chat_format chatml

같은 옵션이라 gpu 사용량은 같다

Agent도 잘 동작할지 테스트 해보니 문제 없다

온도와 전기세를 보니.... cursor 쓰는게 좋을듯 하다


--2025-04-24 추가--

Maverick도 잘 실행이 된다.

llama_perf_sampler_print:    sampling time =      75.18 ms /  1062 runs   (    0.07 ms per token, 14126.85 tokens per second)
llama_perf_context_print:        load time =   99937.80 ms
llama_perf_context_print: prompt eval time =     903.30 ms /    19 tokens (   47.54 ms per token,    21.03 tokens per second)
llama_perf_context_print:        eval time =   29317.80 ms /  1042 runs   (   28.14 ms per token,    35.54 tokens per second)
llama_perf_context_print:       total time =   30531.93 ms /  1061 tokens


비교

unsloth/Llama-4-Scout-17B-16E-Instruct-GGUF/Llama-4-Scout-17B-16E-Instruct-UD-IQ2_XXS.gguf
unsloth/Llama-4-Maverick-17B-128E-Instruct-GGUF/UD-IQ1_S/Llama-4-Maverick-17B-128E-Instruct-UD-IQ1_S-00001-of-00003.gguf

MetricLLaMA4 ScoutLLaMA4 Maverick
Sampling Time (ms)59.5275.18
Sampling Speed (tokens/sec)22026.5814126.85
Load Time (ms)14681.9599937.80
Prompt Eval Time (ms)189.86903.30
Prompt Eval Speed (tokens/sec)1158.7521.03
Eval Time (ms)19427.5229317.80
Eval Speed (tokens/sec)56.1135.54
Total Time (ms)19829.9030531.93
Total Tokens13101061

LLaMA4 Scout vs Maverick - 성능 비교 요약 (시간 기반)

1. Sampling Time

  • Scout: 59.52ms
  • Maverick: 75.18ms
    🔹 Scout가 더 빠름

2. Load Time

  • Scout: 14,681.95ms
  • Maverick: 99,937.80ms
    🔹 Scout가 압도적으로 빠름

3. Prompt Eval Time

  • Scout: 189.86ms
  • Maverick: 903.30ms
    🔹 Scout가 약 5배 빠름

4. Eval Time

  • Scout: 19,427.52ms
  • Maverick: 29,317.80ms
    🔹 Scout가 빠름

5. Total Time

  • Scout: 19,829.90ms
  • Maverick: 30,531.93ms
    🔹 전체 처리 시간에서도 Scout가 우위

Read more

AI 에이전트 시대의 코드 호스팅: Cursor ‘Origin’은 왜 등장했나

AI 코딩 도구로 빠르게 성장한 Cursor가 이제 코드 에디터를 넘어 코드 호스팅 영역까지 확장하고 있습니다. 2026년 8월 17일 Cursor는 Origin이라는 새로운 코드 호스팅 서비스를 early beta로 공개했습니다. 쉽게 말하면 GitHub처럼 Git 저장소를 만들고, 코드를 올리고, Pull Request(PR)를 만들고 리뷰할 수 있는 서비스입니다. 그런데 단순히 "Cursor가 GitHub 비슷한

By JHL

코딩 에이전트에 1,000억 토큰을 써보니, 병목은 모델 밖에 있었다

Codex 화면에 집계된 누적 사용량은 약 866억 토큰이었다. Claude는 내가 확인할 수 있었던 로컬 머신의 집계값만 합쳐도 약 127억 토큰이었다. 다만 Claude는 여러 워크스테이션과 서버에서 사용했고, 중간에 사용량 데이터를 한 번 날려버리기도 했다. 누락된 머신과 기간을 감안하면 실제 사용량은 300억 토큰을 넘었을 가능성이 높다. 여기에 Ollama Cloud로 사용한 GLM, Qwen

By JHL

AI가 짜준 코드가 배포 속도를 높였다면, 이제는 '신뢰성 가드레일'을 세울 때입니다

최근 많은 팀이 AI 코딩 어시스턴트나 에이전트를 도입하면서 코드 생산 속도가 비약적으로 상승했습니다. 하지만 속도가 빨라졌다는 것은 그만큼 잠재적인 결함이 프로덕션 환경으로 유입되는 속도 또한 빨라졌음을 의미합니다. DevOps.com의 이번 글은 AI가 생성한 코드의 특성과 그로 인해 발생하는 새로운 유형의 리스크, 그리고 이를 제어하기 위한 '신뢰성 가드레일(Reliability Guardrails)

By JHL

LLM 시대, 프롬프트 엔지니어링보다 '도메인 전문성'이 더 강력한 무기인 이유

최근 AI 도구들이 비약적으로 발전하면서 '프롬프트 엔지니어링'이라는 기술적 기법에 많은 관심이 쏠렸습니다. 하지만 실제 현업에서 LLM을 극한으로 활용해 고도의 결과물을 만들어내는 사람들의 공통점은 정교한 프롬프트 템플릿을 쓰는 능력이 아니라, 해당 분야에 대한 깊은 '도메인 전문성'을 갖추고 있다는 점입니다. 많은 이들이 LLM이 지식의 격차를 줄여준다고

By JHL