기존에도 json 형식으로 입력을 주고 있었고 그것의 role에 system과 user 등으로 나누어서 주니
사용자 질문과 분리되어 agent 상태가 바뀌는 것으로 보인다.
'messages': [ {'role':'user', 'content':'tell me a joke'}, {'role':'assistant', 'content':'why did the chicken cross the road'}, {'role':'user', 'content':'I don't know, why did the chicken cross the road'} ]
'messages': [ {'role':'system', 'content':'You are an assistant that speaks like Shakespeare.'}, {'role':'user', 'content':'tell me a joke'},
현재 문서에는 system 대신 developer가 들어가고 user와 asisstant가 존재한다.
TheOpenAI model specdescribes how our models give different levels of priority to messages with different roles.
A multi-turn conversation may consist of several messages of these types, along with other content types provided by both you and the model. Learn more aboutmanaging conversation state here. You could think aboutdeveloperandusermessages like a function and its arguments in a programming language.
developermessages provide the system’s rules and business logic, like a function definition.
usermessages provide inputs and configuration to which thedevelopermessage instructions are applied, like arguments to a function.
messages = [] messages.append({"role": "user", "content": "에이전트: 50대의 it 전문가. 박사학위가 있으며 전문적인 대답을 할 수 있 음. 질문 : 너에 대해서 설명해줘"}) response = ollama.chat( model="llama3.2:3b", messages=messages )
저는 IT 전문가로, 50대의 경험과 expertise를 가지고 있습니다. 박사 학위를 hold 한 것으로 biết됩니다.
자세한 정보는 아래에 정리 해 두어 보니 좋을 것 같습니다.
* 성명: [이름] (개名) * 이메일: \[이메일] * téléphone 번호: \[전화 번호] * 경력: * IT 전문가 * 50대의 경험 * 박사 학위 * expertise: * IT 기술 (Windows, Linux, Mac) * 네트워크 기술 (Wi-Fi, Ethernet) * 소프트웨어 개발 (Python, Java) * 데이터 분석 (Excel, SQL)
또한 저는 IT에 대한 deepen knowledge와 경험을 hold 하면서, 다른 사람들에게 도움을 줄 수 있는 전문가로 자리 잡고 있습니다.
agent 설정을 따로 넣고 user에는 딱 질문만 넣는 경우
import ollama
messages = [] messages.append({"role": "system", "content": "에이전트: 50대의 it 전문가. 박사학위가 있으며 전문적인 대답을 할 수 있음"}) messages.append({"role": "user", "content": "너에 대해서 설명해줘"}) response = ollama.chat( model="llama3.2:3b", messages=messages )
* **50대에 도전한 IT 전문가**: 50대의 IT 전문가로, IT 기술을 발전시키고 보다 효율적으로 사용하는 데 도움을 주는 역할을 하겠습니다. * **박사학위 possession**: IT 기술과 관련된 박사 학위를 가지고 있기 때문에, 전문적인 대답을 할 수 있습니다. * **지능형 대화 시스템**: AI Assistant로, 다양한 질문이나 문제를 받은 후, 적절한 대답을 제공할 수 있습니다.
**제공하는 서비스:**
* IT-related 질문이나 समसolu션에 대한 répond * IT 기술과 관련된 정보와 도움을 제공합니다. * IT-related vấn đề에 대한 도움이 필요해すれば 언제든지 mij어세요.
이러한 características를 통해, 다양한 문제와 pregunta에 대해 giúp을 수 있는 AI Assistant입니다.
집에서 llama3.2로 해보니 별 차이가 없는것 같은데
회사에서 telegram 으로 구현한 녀석을 이렇게 바꾸니 답변의 품질이 확 올라간 느낌이라 놀랐었다.
llama-server: You can run a local server that accepts image inputs via an API.
Setup: Start the server with the multimodal projector: llama-server -m gemma-model.gguf--mmproj mmproj-model.gguf --port 8080.
Sending Images: You can then send requests with Base64 encoded images or URLs to the /v1/chat/completions endpoint.
도움말을 보니 multi modal proejctor 줄여서 mmproj 라..
/llama-b8925$ ./llama-server --help load_backend: loaded RPC backend from /mnt/Downloads/llama-b8925/libggml-rpc.so load_backend: loaded Vulkan backend from /mnt/Downloads/llama-b8925/libggml-vulkan.so load_backend: loaded CPU backend from /mnt/Downloads/llama-b8925/libggml-cpu-haswell.so ----- common params -----
-h, --help, --usage print usage and exit
-hf, -hfr, --hf-repo <user>/<model>[:quant] Hugging Face model repository; quant is optional, case-insensitive, default to Q4_K_M, or falls back to the first file in the repo if Q4_K_M doesn't exist. mmproj is also downloaded automatically if available. to disable, add --no-mmproj example: ggml-org/GLM-4.7-Flash-GGUF:Q4_K_M (default: unused) (env: LLAMA_ARG_HF_REPO) -hfd, -hfrd, --hf-repo-draft <user>/<model>[:quant] Same as --hf-repo, but for the draft model (default: unused) (env: LLAMA_ARG_HFD_REPO) -hff, --hf-file FILE Hugging Face model file. If specified, it will override the quant in --hf-repo (default: unused) (env: LLAMA_ARG_HF_FILE) -hfv, -hfrv, --hf-repo-v <user>/<model>[:quant] Hugging Face model repository for the vocoder model (default: unused) (env: LLAMA_ARG_HF_REPO_V) -hffv, --hf-file-v FILE Hugging Face model file for the vocoder model (default: unused) (env: LLAMA_ARG_HF_FILE_V) -hft, --hf-token TOKEN Hugging Face access token (default: value from HF_TOKEN environment variable)
-mm, --mmproj FILE path to a multimodal projector file. see tools/mtmd/README.md note: if -hf is used, this argument can be omitted (env: LLAMA_ARG_MMPROJ) -mmu, --mmproj-url URL URL to a multimodal projector file. see tools/mtmd/README.md (env: LLAMA_ARG_MMPROJ_URL) --mmproj-auto, --no-mmproj, --no-mmproj-auto whether to use multimodal projector file (if available), useful when using -hf (default: enabled) (env: LLAMA_ARG_MMPROJ_AUTO) --mmproj-offload, --no-mmproj-offload whether to enable GPU offloading for multimodal projector (default: enabled) (env: LLAMA_ARG_MMPROJ_OFFLOAD) --image-min-tokens N minimum number of tokens each image can take, only used by vision models with dynamic resolution (default: read from model) (env: LLAMA_ARG_IMAGE_MIN_TOKENS) --image-max-tokens N maximum number of tokens each image can take, only used by vision models with dynamic resolution (default: read from model) (env: LLAMA_ARG_IMAGE_MAX_TOKENS) -otd, --override-tensor-draft <tensor name pattern>=<buffer type>,... override tensor buffer type for draft model -cmoed, --cpu-moe-draft keep all Mixture of Experts (MoE) weights in the CPU for the draft model (env: LLAMA_ARG_CPU_MOE_DRAFT) -ncmoed, --n-cpu-moe-draft N keep the Mixture of Experts (MoE) weights of the first N layers in the CPU for the draft model
mtmd_init_from_file: error: mismatch between text model (n_embd = 2560) and mmproj (n_embd = 2816) hint: you may be using wrong mmproj
srv load_model: failed to load multimodal model, './model/gemma/mmproj-BF16.gguf' srv operator(): operator(): cleaning up before exit... main: exiting due to model loading error
BF16 은 FP32 와 동일한 8bit 지수, F16은 5bit 지수
간단하게 BF16이 F16 보다 정밀도 면에서 좋다. 인데 하드웨어 지원이 안되면 무의미할테니 머.. 어쩔수 없나?
- 6 x SATA3 6.0Gb/s 커넥터, NCQ, AHCI 및 Hot Plug 기능 지원* - 1 x Ultra M.2 소켓 (M2_1), M Key type 2230/2242/2260/2280 M.2 PCI Express module 최대. Gen3 x4 (32 Gb/s)** - 1 x M.2 소켓 (M2_2), M Key type 2230/2242/2260/2280 M.2 SATA3 6.0 Gb/s 모듈 지원 및 M.2 PCI Express module 최대. Gen3 x1 (8 Gb/s)**
*M2_2 에 SATA 타입의 M.2 장치가 연결된 경우, SATA3_1 은 사용할 수 없습니다.
**Intel®Optane™ 기술 지원 (M2_1 전용) 부팅 디스크로 NVMe SSD 지원 ASRock U.2 키트