Skip to content

Instantly share code, notes, and snippets.

@entron
entron / cnn_dummy_bench.ipynb
Last active June 13, 2020 16:43
simple gpu benchmark code with pytorch for common CNN netoworks
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@entron
entron / http-proxy.conf.md
Last active August 22, 2024 13:51 — forked from alphamarket/http-proxy.conf.md
How to make docker pull using a socks5 proxy

Create the config file:

mkdir -p /etc/systemd/system/docker.service.d && \
vi /etc/systemd/system/docker.service.d/http-proxy.conf

Put up the configs:

@entron
entron / set-apt-proxy.md
Created August 23, 2024 01:39 — forked from wonderbeyond/set-apt-proxy.md
[ubuntu][socks5][proxy] Set proxy for apt

Writing an apt proxy conf file /etc/apt/apt.conf.d/proxy.conf as below.

Acquire::http::Proxy "socks5h://127.0.0.1:1080";
Acquire::https::Proxy "socks5h://127.0.0.1:1080";
Acquire::socks::Proxy "socks5h://127.0.0.1:1080";

And the proxy settings will be applied the next time we run apt.

@entron
entron / gemma3_first_last_10k_tokens.txt
Created April 11, 2025 16:28
The first and last 10K tokens of Gemma 3 tokenizer
First 10000 tokens in the tokenizer:
Token: <pad>, ID: 0
Token: <eos>, ID: 1
Token: <bos>, ID: 2
Token: <unk>, ID: 3
Token: <mask>, ID: 4
Token: [multimodal], ID: 5
Token: <unused0>, ID: 6
Token: <unused1>, ID: 7
Token: <unused2>, ID: 8
@entron
entron / openai4o_first_last_10k_tokens.txt
Created April 11, 2025 18:38
The first and last 10K tokens of OpenAI 4o tokenizer
First 10000 tokens in the tokenizer:
Token ID: 0, Token: !
Token ID: 1, Token: "
Token ID: 2, Token: #
Token ID: 3, Token: $
Token ID: 4, Token: %
Token ID: 5, Token: &
Token ID: 6, Token: '
Token ID: 7, Token: (
Token ID: 8, Token: )