'2026/05'에 해당되는 글 85건

  1. 2026.05.15 gpt님 만세! - pip torch 버전 낮추기
  2. 2026.05.14 QT 런타임중 언어 변경
  3. 2026.05.14 QT QMainWindow, QWidget, QDialog
  4. 2026.05.14 U-net, segmentation
  5. 2026.05.14 QAT, PTQ .. 모델 경량화
  6. 2026.05.13 wan2.2
  7. 2026.05.13 nxp CMSIS-NN
  8. 2026.05.13 x-cube-ai 예제..?
  9. 2026.05.13 QT 창관리
  10. 2026.05.13 QString arg()

이런저런 에러를 내면서 못도는거

home/minimonk/.local/lib/python3.10/site-packages/torch/cuda/__init__.py:384: UserWarning: Found GPU0 NVIDIA GeForce GTX 1080 Ti which is of compute capability (CC) 6.1.
The following list shows the CCs this version of PyTorch was built for and the hardware CCs it supports:
- 7.5 which supports hardware CC >=7.5,<8.0
- 8.0 which supports hardware CC >=8.0,<9.0 except {8.7}
- 8.6 which supports hardware CC >=8.6,<9.0 except {8.7}
- 9.0 which supports hardware CC >=9.0,<10.0
- 10.0 which supports hardware CC >=10.0,<11.0 except {10.1}
- 12.0 which supports hardware CC >=12.0,<13.0
Please follow the instructions at https://pytorch.org/get-started/locally/ to install a PyTorch release that supports one of these CUDA versions: 12.6
  _warn_unsupported_code(d, device_cc, code_ccs)
/home/minimonk/.local/lib/python3.10/site-packages/torch/cuda/__init__.py:384: UserWarning: Found GPU1 NVIDIA GeForce GTX 1080 Ti which is of compute capability (CC) 6.1.
The following list shows the CCs this version of PyTorch was built for and the hardware CCs it supports:
- 7.5 which supports hardware CC >=7.5,<8.0
- 8.0 which supports hardware CC >=8.0,<9.0 except {8.7}
- 8.6 which supports hardware CC >=8.6,<9.0 except {8.7}
- 9.0 which supports hardware CC >=9.0,<10.0
- 10.0 which supports hardware CC >=10.0,<11.0 except {10.1}
- 12.0 which supports hardware CC >=12.0,<13.0
Please follow the instructions at https://pytorch.org/get-started/locally/ to install a PyTorch release that supports one of these CUDA versions: 12.6
  _warn_unsupported_code(d, device_cc, code_ccs)
/home/minimonk/.local/lib/python3.10/site-packages/torch/cuda/__init__.py:502: UserWarning: 
NVIDIA GeForce GTX 1080 Ti with CUDA capability sm_61 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_75 sm_80 sm_86 sm_90 sm_100 sm_120.
If you want to use the NVIDIA GeForce GTX 1080 Ti GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

 

torch.AcceleratorError: CUDA error: no kernel image is available for execution on the device
Search for `cudaErrorNoKernelImageForDevice' in https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html for more information.
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

 

cu118로 낮추니 잘된다. 만세!

pip3 uninstall -y torch triton
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

 

 

.이거면.. openai 쪽 api도 필요없고

허깅페이스에서 모델만 받으면 어떻게 해결 될 듯 한데

그래도 KURE-v1이 가볍단 해도 아주 가벼운건 또 아니네..

python3                                2354MiB

 

일단은 잘 돌아가는 것 같은니. pgvector랑 연동해보자 ㅋㅋ

>>> from sentence_transformers import SentenceTransformer
>>> from sklearn.metrics.pairwise import cosine_similarity
>>> 
>>> model = SentenceTransformer("nlpai-lab/KURE-v1")
Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.
Loading weights: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████| 391/391 [00:00<00:00, 1080.33it/s]
>>> 
>>> documents = [
...     "고양이가 소파 위에 앉아 있다.",
...     "강아지가 공원에서 뛰어논다.",
...     "반려동물이 집에서 쉬고 있다."
... ]
>>> 
>>> query = "집 안의 동물"
>>> 
>>> doc_embeddings = model.encode(
...     documents,
...     normalize_embeddings=True
... )
>>> 
>>> query_embedding = model.encode(
...     query,
...     normalize_embeddings=True
... )
>>> 
>>> scores = cosine_similarity(
...     [query_embedding],
...     doc_embeddings
... )[0]
>>> 
>>> for doc, score in zip(documents, scores):
...     print(f"{score:.4f} : {doc}")
... 
0.6314 : 고양이가 소파 위에 앉아 있다.
0.6035 : 강아지가 공원에서 뛰어논다.
0.7798 : 반려동물이 집에서 쉬고 있다.

 

혹시나 해서 찾아본 cuda 1 번으로 돌리는 방법

sentence_transformer
nlpai-lab/KURE-v1


from sentence_transformers import SentenceTransformer
from sklearn.metrics.pairwise import cosine_similarity

model = SentenceTransformer("nlpai-lab/KURE-v1", device="cuda:1")

documents = [
    "고양이가 소파 위에 앉아 있다.",
    "강아지가 공원에서 뛰어논다.",
    "반려동물이 집에서 쉬고 있다."
]

query = "집 안의 동물"

doc_embeddings = model.encode(
    documents,
    normalize_embeddings=True
)

query_embedding = model.encode(
    query,
    normalize_embeddings=True
)

scores = cosine_similarity(
    [query_embedding],
    doc_embeddings
)[0]

for doc, score in zip(documents, scores):
    print(f"{score:.4f} : {doc}")

 

좋아좋아 gpu 1번 ㅋㅋ

'프로그램 사용 > ai 프로그램' 카테고리의 다른 글

openai api  (0) 2026.05.18
RAG 시도 - postgresql(14) + pgvector  (1) 2026.05.15
wan2.2  (0) 2026.05.13
openwebui 설치 시도  (0) 2026.05.13
LLM 소비전력 단상  (2) 2026.05.13
Posted by 구차니
Programming/qt2026. 5. 14. 17:49

아직 테스트는 못해봄.

일단 실행시에 LANG 으로 바꾸는건 해봤는데

실행중에 바꾸어야 할 것 같아서 찾아봄.

 

기존 translator을 제거(QApplication::removeTranslator)하고, 다시 install(위 적용 참조)한다. 
      
          app.removeTranslator(&translator);
          translator.load("lang/ko_kr");
          app.installTranslator(&translator);
      
    installTranslator하면, QEvent::LanguageChange이벤트가 발생한다. 이 이벤트로 번역문자열이 새로운 translator에 의해 적용되도록 한다. 
         
          void MainWindow::changeEvent(QEvent* event)
          {
              if (event->type() == QEvent::LanguageChange)
              {
                  // 디자이너에 의해 생성된 문자열
                  ui.retranslateUi(this);
            
                  // 코드에서 삽입한 문자열
                  retranslate();
              }
              QMainWindow::changeEvent(event);
          }

[링크 : https://dorigom.tistory.com/359]

'Programming > qt' 카테고리의 다른 글

QCombobox + 다국어  (0) 2026.05.21
qt widget 에서 배경화면 스타일 시트 적용 안될 경우  (0) 2026.05.20
QT QMainWindow, QWidget, QDialog  (0) 2026.05.14
QT 창관리  (0) 2026.05.13
QString arg()  (0) 2026.05.13
Posted by 구차니
Programming/qt2026. 5. 14. 15:30

 

QMainWindow

 -  내부는 QWidget 으로 채워질수 있음

 + setWindowModality(Qt::WindowModal)

 + show()

 + raise() 로 띄움

 QDialog

 -  별도 창에 표시되는 취상위 위젯

 + setWindowModality(Qt::WindowModal)

 + exec() 로 띄움

 - QWidget 기반

QWidget

 - 어떻게 보면 얘가 근본?

 [링크 : https://ggangtalife.tistory.com/entry/PyQt5-클래스-QMainWindow-QDialog-QWidget-차이점]

 

다이얼로그

 - modal 속성으로 주로 사용(제어권 독점) 

 - 확인/취소 누르는 용도

[링크 : https://coding-kindergarten.tistory.com/171]

'Programming > qt' 카테고리의 다른 글

qt widget 에서 배경화면 스타일 시트 적용 안될 경우  (0) 2026.05.20
QT 런타임중 언어 변경  (0) 2026.05.14
QT 창관리  (0) 2026.05.13
QString arg()  (0) 2026.05.13
qt 동적 크기  (0) 2026.05.12
Posted by 구차니

 

[링크 : https://github.com/PINTO0309/TensorflowLite-UNet]

[링크 : https://huggingface.co/qualcomm/Unet-Segmentation]

[링크 : https://github.com/milesial/Pytorch-UNet]

[링크 : https://github.com/Rumit95/Auto_Segmentation] semantic segmentation

[링크 : https://github.com/Rumit95/Semantic-Segmentation-of-Image]

 

 

  • 클래스 1: 애완 동물에 속하는 픽셀
  • 클래스 2: 애완동물과 접하는 픽셀
  • 클래스 3: 위에 속하지 않음/주변 픽셀

[링크 : https://www.tensorflow.org/tutorials/images/segmentation?hl=ko]

'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글

MVTec AD 데이터 셋  (0) 2026.05.20
VAD - PaDiM, Patchcore - 정상이 아님을 탐지  (0) 2026.05.19
QAT, PTQ .. 모델 경량화  (0) 2026.05.14
unet  (0) 2026.05.06
keras - transfer learning / fine tuning  (0) 2025.09.17
Posted by 구차니

QAT - Quantization Aware Training

양자화 하지 않고 학습후

# Load MNIST dataset
mnist = keras.datasets.mnist
(train_images, train_labels), (test_images, test_labels) = mnist.load_data()

# Normalize the input image so that each pixel value is between 0 to 1.
train_images = train_images / 255.0
test_images = test_images / 255.0

# Define the model architecture.
model = keras.Sequential([
  keras.layers.InputLayer(input_shape=(28, 28)),
  keras.layers.Reshape(target_shape=(28, 28, 1)),
  keras.layers.Conv2D(filters=12, kernel_size=(3, 3), activation='relu'),
  keras.layers.MaxPooling2D(pool_size=(2, 2)),
  keras.layers.Flatten(),
  keras.layers.Dense(10)
])

# Train the digit classification model
model.compile(optimizer='adam',
              loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),
              metrics=['accuracy'])

model.fit(
  train_images,
  train_labels,
  epochs=1,
  validation_split=0.1,
)

 

양자화 모델로 변환하고, 파인튜닝

import tensorflow_model_optimization as tfmot

quantize_model = tfmot.quantization.keras.quantize_model

# q_aware stands for for quantization aware.
q_aware_model = quantize_model(model)

# `quantize_model` requires a recompile.
q_aware_model.compile(optimizer='adam',
              loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),
              metrics=['accuracy'])

q_aware_model.summary()

train_images_subset = train_images[0:1000] # out of 60000
train_labels_subset = train_labels[0:1000]

q_aware_model.fit(train_images_subset, train_labels_subset,
                  batch_size=500, epochs=1, validation_split=0.1)

[링크 : https://www.tensorflow.org/model_optimization/guide/quantization/training?hl=ko]

 

PTQ - Post Training Quantization

[링크 : https://www.tensorflow.org/model_optimization/guide/quantization/post_training?hl=ko]

 

pruning - 0에 가까운 애들 없애기 (가지치기)

quantization (양자화)

distillation (증류)

low rank factorization (NxM -> Xxk kxM)

[링크 : https://u-b-h.tistory.com/13]

[링크 : https://asidefine.tistory.com/318]

'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글

VAD - PaDiM, Patchcore - 정상이 아님을 탐지  (0) 2026.05.19
U-net, segmentation  (0) 2026.05.14
unet  (0) 2026.05.06
keras - transfer learning / fine tuning  (0) 2025.09.17
keras ssd mobilenet  (0) 2025.09.16
Posted by 구차니

comfyui 보다가 동영상 만드는거에서 보이는 wan2.2 라는 키워드

이것도 알리바바 쪽 꺼라서 로고가 qwen이랑 같군.

[링크 : https://github.com/Wan-Video/Wan2.2]

[링크 : https://www.youtube.com/watch?v=sGZk2StxHho]

 

teacache 쓰면 빨리진다고 하는데..

[링크 : https://www.internetmap.kr/entry/TeaCache-with-Flux-GGUF-and-HunyuanVideo]

    [링크 : https://www.reddit.com/r/StableDiffusion/comments/1jllera/anyone_know_how_to_run_wan_21_on_a_gtx_1080ti/?tl=ko]

 

근데.. 파스칼은 안보이고 볼타부터 보이네.. 흐규흐규

[링크 : https://github.com/komikndr/raylight]

[링크 : https://github.com/pollockjj/ComfyUI-MultiGPU]

[링크 : https://github.com/robertvoy/ComfyUI-Distributed]

[링크 : https://github.com/Comfy-Org/ComfyUI/pull/7063]

    [링크 : https://www.reddit.com/r/comfyui/comments/1opv1t1/multi_gpu_support_for_video_generation_with_wan_22/]

Posted by 구차니
embeded/i.mx 8m plus2026. 5. 13. 17:48

cortex-M 을 위한 CMSIS-NN 예제 라고 해야하나?

아무튼 먼가.. 드럽네 -_-

그나저나 웨이트는.. 어떻게 펌웨어 안에 넣지?

 

[링크 : https://www.nxp.com/docs/en/application-note/AN12781.pdf]

[링크 : https://www.nxp.com/design/design-center/software/eiq-ai-development-environment/eiq-for-arm-cmsis-nn:eIQArmCMSISNN]

'embeded > i.mx 8m plus' 카테고리의 다른 글

g2d_surface g2d_blit()  (0) 2026.02.10
eiq 모델 정리  (0) 2025.09.16
eiq 데이터 구조  (0) 2025.09.05
ubuntu 22.04 + cuda + cudnn 설치  (0) 2025.09.04
import tensorflow illegal instruction  (0) 2025.09.04
Posted by 구차니
embeded/Cortex-M7 STM2026. 5. 13. 17:35

'embeded > Cortex-M7 STM' 카테고리의 다른 글

srec_cat 해봄  (0) 2026.05.22
stm32h757 링커 스크립트  (0) 2026.03.13
stm32h757 메모리(SRAM) 구조  (0) 2026.03.13
stm32f7 dual bank flash  (0) 2026.02.03
stm32f746g-disco with semtech sx1276 and lvgl  (0) 2026.02.03
Posted by 구차니
Programming/qt2026. 5. 13. 15:24

show() 보이기

hide() 숨기기

raise() 가장 위로 창 옮기기

activateWindow() 윈도우 기준 입력 활성화(포커스)

setFocus() 위젯 기준 입력 활성화

'Programming > qt' 카테고리의 다른 글

QT 런타임중 언어 변경  (0) 2026.05.14
QT QMainWindow, QWidget, QDialog  (0) 2026.05.14
QString arg()  (0) 2026.05.13
qt 동적 크기  (0) 2026.05.12
QT QPushButton 의 텍스트 폰트 / 색상 변경하기  (0) 2026.05.11
Posted by 구차니
Programming/qt2026. 5. 13. 14:15

cstring에서는 없는것 같은데. 어떻게 보면 python 스타일과 비슷한

인자를 받아서 포맷팅하는 방법이 존재한다.

 

int i;                // current file's number
int total;            // number of files to process
QStringView fileName; // current file's name

QString status = QString("Processing file %1 of %2: %3")
                .arg(i).arg(total).arg(fileName);

[링크 : https://norux.me/33]

[링크 : https://doc.qt.io/qt-6/qstring.html#arg]

'Programming > qt' 카테고리의 다른 글

QT QMainWindow, QWidget, QDialog  (0) 2026.05.14
QT 창관리  (0) 2026.05.13
qt 동적 크기  (0) 2026.05.12
QT QPushButton 의 텍스트 폰트 / 색상 변경하기  (0) 2026.05.11
qt5 창 내용 바꾸기  (0) 2026.05.07
Posted by 구차니