class Blinky(freq: Int, startOn: Boolean = false) extends Module { val io = IO(new Bundle { val led0 = Output(Bool()) }) // Blink LED every second using Chisel built-in util.Counter val led = RegInit(startOn.B) val (_, counterWrap) = Counter(true.B, freq / 2) when(counterWrap) { led := ~led } io.led0 := led }
object Main extends App { // These lines generate the Verilog output println( ChiselStage.emitSystemVerilog( new Blinky(1000), firtoolOpts = Array("-disable-all-randomization", "-strip-debug-info") ) ) }
- 이 밖에 첫 시도가 09:58~10:20에 OOM으로 죽어서 22분을 잃었습니다. - 2에폭이면 충분했다는 결과를 기준으로 하면, 다음부터 SFT는 약 2시간 40분이면 됩니다.
3. 평가와 변환
- 벤치 9회(모델과 형식 조합): 14:36 → 15:49, 약 1시간 15분 - 한 번에 5~26분이 걸렸습니다. 학습하지 않은 형식으로 묻는 교차 평가와 base 평가가 오래 걸렸는데, 모델이 멈추지 않고 최대 길이까지 생성하기 때문입니다. - GGUF 변환 3개: 몇 분 이내
아래가 잘못 진행된 실험.
base 모델은 llama-completion으로 말을 주면 이어 나가도록 구성된 모델이고
/mnt/llm-scad/gguf$ /mnt/Downloads/llama-b10488/llama-completion -m base110m-step3814-f32.gguf -sm none --temp 0 --repeat-penalty 1.1 -n 200 -p $'// Make a tube with outer diameter 12 mm, inner diameter 8 mm and length 40 mm.\n' 0.00.234.065 I llama_completion: llama backend init 0.00.234.071 I llama_completion: load the model and apply lora adapter, if any 0.00.482.739 W load: control-looking token: 7 '<|end|>' was not control-type; this is probably a bug in the model. its type will be overridden 0.00.661.575 I cmn init: llama threadpool init, n_threads = 6 0.00.674.412 I 0.00.674.450 I system_info: n_threads = 6 (n_threads_batch = 6) / 6 | CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | BMI2 = 1 | LLAMAFILE = 1 | OPENMP = 1 | REPACK = 1 | 0.00.674.450 I 0.00.674.513 I sampler seed: 2978975464 0.00.674.529 I sampler params: repeat_last_n = 64, repeat_penalty = 1.100, frequency_penalty = 0.000, presence_penalty = 0.000 dry_multiplier = 0.000, dry_base = 1.750, dry_allowed_length = 2, dry_penalty_last_n = 64 top_k = 40, top_p = 0.950, min_p = 0.050, xtc_probability = 0.000, xtc_threshold = 0.100, typical_p = 1.000, top_n_sigma = -1.000, temp = 0.000 mirostat = 0, mirostat_lr = 0.100, mirostat_ent = 5.000, adaptive_target = -1.000, adaptive_decay = 0.900 0.00.674.534 I sampler chain: logits -> penalties -> ?dry -> ?top-n-sigma -> top-k -> ?typical -> top-p -> min-p -> ?xtc -> temp-ext -> dist 0.00.674.535 I generate: n_ctx = 2048, n_batch = 2048, n_predict = 200, n_keep = 0 0.00.674.535 I // Make a tube with outer diameter 12 mm, inner diameter 8 mm and length 40 mm. // The tube is made of a 3mm tube with a hole in the middle. // The tube is made of a 6mm tube with a hole in the middle. // The tube is made of a 12mm tube with a hole in the middle. // The tube is made of a 15mm tube with a hole in the middle. // The tube is made of a 16mm tube with a hole in the middle. // The tube is made of a 18mm tube with a hole in the middle. // The tube is made of a 19mm tube with a hole in the middle. // The tube is made of a 20mm tube with a hole in the middle. // The tube is made of a 30mm tube with a hole in the middle. // The
0.01.140.346 I common_perf_print: sampling time = 69.83 ms 0.01.140.347 I common_perf_print: samplers time = 61.87 ms / 225 tokens 0.01.140.349 I common_perf_print: load time = 211.82 ms 0.01.140.351 I common_perf_print: prompt eval time = 12.78 ms / 25 tokens ( 0.51 ms per token, 1955.88 tokens per second) 0.01.140.352 I common_perf_print: eval time = 381.24 ms / 199 runs ( 1.92 ms per token, 521.98 tokens per second) 0.01.140.353 I common_perf_print: total time = 465.94 ms / 224 tokens 0.01.140.353 I common_perf_print: unaccounted time = 2.09 ms / 0.4 % (total - sampling - prompt eval - eval) / (total) 0.01.140.354 I common_perf_print: graphs reused = 198
sft_plain은 sft를 통해 openSCAD 형태의 출력을 학습시킨 모델
/mnt/llm-scad/gguf$ /mnt/Downloads/llama-b10488/llama-completion -m sft_plain-step9555-f32.gguf -sm none --temp 0 --repeat-penalty 1.1 -n 200 -p $'// Make a tube with outer diameter 12 mm, inner diameter 8 mm and length 40 mm.\n' 0.00.212.691 I llama_completion: llama backend init 0.00.212.697 I llama_completion: load the model and apply lora adapter, if any 0.00.461.915 W load: control-looking token: 7 '<|end|>' was not control-type; this is probably a bug in the model. its type will be overridden 0.00.632.982 I cmn init: llama threadpool init, n_threads = 6 0.00.645.921 I 0.00.645.961 I system_info: n_threads = 6 (n_threads_batch = 6) / 6 | CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | BMI2 = 1 | LLAMAFILE = 1 | OPENMP = 1 | REPACK = 1 | 0.00.645.961 I 0.00.646.024 I sampler seed: 3402034624 0.00.646.039 I sampler params: repeat_last_n = 64, repeat_penalty = 1.100, frequency_penalty = 0.000, presence_penalty = 0.000 dry_multiplier = 0.000, dry_base = 1.750, dry_allowed_length = 2, dry_penalty_last_n = 64 top_k = 40, top_p = 0.950, min_p = 0.050, xtc_probability = 0.000, xtc_threshold = 0.100, typical_p = 1.000, top_n_sigma = -1.000, temp = 0.000 mirostat = 0, mirostat_lr = 0.100, mirostat_ent = 5.000, adaptive_target = -1.000, adaptive_decay = 0.900 0.00.646.044 I sampler chain: logits -> penalties -> ?dry -> ?top-n-sigma -> top-k -> ?typical -> top-p -> min-p -> ?xtc -> temp-ext -> dist 0.00.646.045 I generate: n_ctx = 2048, n_batch = 2048, n_predict = 200, n_keep = 0 0.00.646.045 I // Make a tube with outer diameter 12 mm, inner diameter 8 mm and length 40 mm. difference() { cylinder(r=7, h=40, $fn=96); translate([0, 0, -1]) cylinder(r=8, h=42, $fn=96); } [end of text]
0.00.798.376 I common_perf_print: sampling time = 27.36 ms 0.00.798.378 I common_perf_print: samplers time = 24.40 ms / 82 tokens 0.00.798.382 I common_perf_print: load time = 204.40 ms 0.00.798.383 I common_perf_print: prompt eval time = 12.79 ms / 25 tokens ( 0.51 ms per token, 1955.26 tokens per second) 0.00.798.387 I common_perf_print: eval time = 111.27 ms / 56 runs ( 1.99 ms per token, 503.28 tokens per second) 0.00.798.387 I common_perf_print: total time = 152.46 ms / 81 tokens 0.00.798.389 I common_perf_print: unaccounted time = 1.04 ms / 0.7 % (total - sampling - prompt eval - eval) / (total) 0.00.798.389 I common_perf_print: graphs reused = 55
sft_chat은 llama-cli 를 통해서 채팅 형태로 학습된 모델
/mnt/llm-scad/gguf$ /mnt/Downloads/llama-b10488/llama-cli -m sft_chat-step9555-f32.gguf -sm none --temp 0 --repeat-penalty 1.1 -n 200 -st -p "Make a tube with outer diameter 12 mm, inner diameter 8 mm and length 40 mm."
build : b10488-9d77fa172 model : sft_chat-step9555-f32.gguf ftype : all F32 modalities : text
available commands: /exit or Ctrl+C stop or exit /regen regenerate the last response /clear clear the chat history /read add a text file /glob add text files using globbing pattern
> Make a tube with outer diameter 12 mm, inner diameter 8 mm and length 40 mm. difference() { cylinder(r=6, h=40, $fn=96); translate([0, 0, -1]) cylinder(r=4, h=42, $fn=96); }
Cyc (pronounced /ˈsaɪk/SYKE) is a long-term artificial intelligence (AI) project that aims to assemble a comprehensive ontology and knowledge base that spans the basic concepts and rules about how the world works. Hoping to capture common sense knowledge, Cyc focuses on implicit knowledge. The project began in July 1984 at MCC and was developed later by the Cycorp company. The name "Cyc" (from "encyclopedia") is a registered trademark owned by Cycorp. CycL has a publicly released specification, and dozens of HL (Heuristic Level) modules were described in Lenat and Guha's textbook,[1] but the Cyc inference engine code and the full list of HL modules are Cycorp-proprietary.[2]
"제목" 창 제목 표시줄에 나타낼 제목입니다. 경로 시작 디렉터리입니다. B 새 창을 만들지 않고 응용 프로그램을 시작합니다. 응용 프로그램에서 ^C 처리를 무시합니다. 응용 프로그램이 ^C 처리를 활성화하지 않는 한 ^Break로만 응용 프로그램을 인터럽트할 수 있습니다. I 현재 환경이 아닌 새 환경을 원래의 환경 값으로 cmd.exe에 전달합니다. MIN 창을 최소화하여 시작합니다. MAX 전체 화면을 표시하며 시작합니다. SEPARATE 16비트 Windows 프로그램을 별도의 메모리 영역에서 시작합니다. SHARED 16비트 Windows 프로그램을 공유 메모리 영역에서 시작합니다. LOW 응용 프로그램을 IDLE 우선 순위 클래스에서 시작합니다. NORMAL 응용 프로그램을 NORMAL 우선 순위 클래스에서 시작합니다. HIGH 응용 프로그램을 HIGH 우선 순위 클래스에서 시작합니다. REALTIME 응용 프로그램을 REALTIME 우선 순위 클래스에서 시작합니다. ABOVENORMAL 응용 프로그램을 ABOVENORMAL 우선 순위 클래스에서 시작합니다. BELOWNORMAL 응용 프로그램을 BELOWNORMAL 우선 순위 클래스에서 시작합니다. NODE 기본 NUMA(Non-Uniform Memory Architecture) 노드를 10진수 정수로 지정합니다. AFFINITY 프로세서 선호도 마스크를 16진수로 지정합니다. 프로세스는 현재 실행 중인 처리기로 제한됩니다.
/AFFINITY 및 /NODE가 조합되면 선호도 마스크는 달리 해석됩니다. NUMA 노드의 처리기 마스크가 곧바로 전환되어 0비트에서 시작하는 것처럼 선호도 마스크를 지정하십시오. 프로세스는 지정한 선호도 마스크와 NUMA 노드 간에 공통이면서 현재 실행 중인 처리기로 제한됩니다. 공통 처리기가 없으면 프로세스는 지정한 NUMA 노드에서 실행 중인 처리기로 제한됩니다. WAIT 응용 프로그램을 시작하고 끝날 때까지 기다립니다. 명령/프로그램 내부 cmd 명령 또는 배치 파일인 경우 명령 처리기는 /K 스위치를 사용하여 cmd.exe를 실행합니다. 이것은 명령 실행 후에도 창이 남아 있게 합니다.
내부 cmd 명령이나 배치 파일이 아니면 프로그램이므로 창 모드 응용 프로그램 또는 콘솔 응용 프로그램으로서 실행됩니다.
매개 변수 명령/프로그램으로 전달되는 매개 변수입니다.
참고: SEPARATE 및 SHARED 옵션은 64비트 플랫폼에서 사용할 수 없습니다.
/NODE를 지정하면 NUMA 시스템의 메모리 위치를 활용하는 방식으로 프로세스를 생성할 수 있습니다. 예를 들어 공유 메모리를 통해 두 프로세스 간에 통신하는 양이 상당하다면 메모리 대기 시간을 최소화하기 위해 동일한 기본 NUMA 노드를 공유하도록 두 프로세스를 만들 수 있습니다. 그러면 두 프로세스는 가능한 경우 동일한 NUMA 노드로부터 메모리를 할당하고, 지정한 노드 외부의 처리기에서 자유롭게 실행합니다.
이들 두 프로세스는 동일한 NUMA 노드 내의 특정 처리기에서 실행되도록 추가로 제한됩니다. 다음 예제에서 application1은 노드의 가장 상위 처리기 2개에서 실행되며, application2는 노드의 그 다음 두 처리기에서 실행됩니다. 이 예에서는 지정한 노드에 최소 4개의 논리 처리기가 있다고 가정합니다. 참고로, 노드 수는 선호도 마스크를 변경하지 않고도 컴퓨터의 유효한 노드 수로 변경할 수 있습니다.
명령 확장을 사용하면 명령줄을 통한 외부 명령 호출이나 START명령이 아래와 같이 바뀝니다.
실행 파일이 아닌 파일을 단지 파일 이름을 명령으로 입력함으로써 파일 연결을 통해 호출할 수 있습니다. (예를 들면 WORD.DOC는 .DOC 파일 확장자와 연결된 응용 프로그램을 시작합니다.) 명령 스크립트 안에서 이러한 연결을 만드는 방법을 알려면 ASSOC와 FTYPE 명령을 입력하십시오.
32비트 GUI 응용 프로그램을 실행할 때는, CMD.EXE는 응용 프로그램이 끝나기를 기다리지 않고 명령 프롬프트로 반환됩니다. 명령 스크립트 안에서 실행되면 이러한 새 동작이 발생하지 않습니다.
확장자나 경로 한정자 없이 첫 토큰이 CMD인 명령줄을 실행할 때는 CMD를 COMSPEC 변수의 값으로 바꾸며 따라서 최소한의 경우 임의의 CMD.EXE 버전이 선택되는 것을 막을 수 있습니다.
첫 토큰이 확장자를 가지지 않는 명령줄을 실행할 때 CMD.EXE는 어떤 확장자를 어떤 순서로 찾을 것인지 결정하기 위해 PATHEXT 환경 변수 값을 사용합니다. PATHEXT 변수의 기본값은 아래와 같습니다. .COM;.EXE;.BAT;.CMD
구문에서 PATH 변수와 같이 ; 기호로 요소를 분리한다는 점에 유의하십시오.
명령을 실행할 때는 확장자가 같지 않으면 확장자가 없는 이름이 디렉터리 이름과 같은 지 찾아보고 만약 있으면 START명령이 그 경로에서 탐색기를 시작합니다. 명령줄에서 이러한 것이 수행되면 그 경로에 CD /D를 수행하는 것과 같습니다.