Category: Uncategorized

  • Joblib Memory that expires after timelimit

    This doesn’t look well documented, but there’s an issue that trackes the problem a solution. I made it a bit simpler to use this way: And then you can use it like

  • poetry is great

    There are various tools for creating virtual env and I settled down with poetry. What’s great with poetry is that I can manage dependencies of development and serving. Dependencies of ‘dev’ can be specified using -G. For installing packages for serving, exclude a group as: Poetry creates pyproject.toml to list the packages I added. When…

  • How to add unittest to pre-commit

    I was looking for the predefined hooks but then learned that unittest can be easily written myself. What’s in the below runs all tests of the project. If you don’t use poetry, remove ‘poetry run’ from ‘entry’.

  • 셀프로 모든걸 다 하는 LLM

    Self-Rewarding Language Models: Human feedback은 bottleneck일수밖에 없고, reward 모델은 human feedback을 받은다음 frozen 되서 policy 개선 중에는 함께 개선되지 못한다.그러지말고 이 모두를 합친다. Response 도 만들고, reward 도 정하고, 그 둘로부터 트레이닝까지. 물론 방향을 잡아주는 몇개 훈련데이터는 넣음. Self-Instruct: Our *pipeline generates instructions, input, and output samples from a language model*, then filters invalid or…

  • LLM의 툴 사용

    Andrew Ng가 다음 트윗을 올렸다 그래서 위 트윗에 나온 세 논문을 정리해 보았다 여기서 언급된 첫번째 논문인 Gorilla는 self instruct (GPT4로 instruct fine tuning data 만듦)를 통해 만든 데이타로 llama 를 파인 튜닝했더니, 주어진 문제에 맞는 api call을 잘 만들더라하는 것. RAG도 가능하고 zero shot 도 됨. arxiv.org/abs/2305.15334 두번째 논문인 MM React 는 멀티모달 (비디오,…

  • Chromebook 은 어떨까

    그동안 총 5대의 크롬북을 사용해봤다. 한국에는 대부분 판매하지 않거나, 판매하더라도 좋은 성능의 머신은 정발이 잘 되어있지 않기에 모두 아마존을 통해 구입했다. 이 정도 써봤으면 이 크롬북이란 카테고리에 대한 의견을 기록해 혹시라도 크롬북을 개발용으로 고민하는 사람들이 있다면 도움이 될까 해 글을 적어본다. SAMSUNG 13.3″ Galaxy Chromebook Laptop Computer w/ 256GB Storage, 8GB RAM, 4K AMOLED Touchscreen…

  • GCE disk monitoring

    This was something I didn’t know about until my disk became full on my gce instance. By default, disk usage isn’t listed in the alerts for monitoring, so it’s very easy to forget to configure that. To monitor disk usage, install a package and add monitoring per https://cloud.google.com/compute/docs/disks/review-disk-metrics. And then alert on their values.

  • Unattended apt security upgrade

    One of the first things for security of servers is to update packages for security patches:

  • rkhunter

    After reading the shocking sshd backdoor story, I decided to install rkhunter for rootkit detection. Here’s the configuration changes I’ve made. In /etc/rkhunter.conf.local: And in /etc/rkhunter.conf, I have commented out MAIL_CMD and MAIL-ON-WARNING. (You need to make sure that your email works on the servers, before this.) Finally, make the rkhunter update properly by modifying…

  • Flask의 request

    Flask의 request는 PEP 567의 Context Variables을 Werkzeug의 LocalProxy로 구현한 객체입니다. Context Variables은 thread local을 개선합니다. This concept is similar to thread-local storage (TLS), but, unlike TLS, it also allows correctly keeping track of values per asynchronous task, e.g. asyncio.Task. https://peps.python.org/pep-0567/ LocalProxy는 매번 컨텍스트를 ContextVar.get() 을 사용할 필요 없이 마치 로컬 객체처럼 다루게 해줍니다. 아래 코드의 _request와…