電腦之前安裝過driver(非透過apt安裝,因為apt提供的driver有時會太過老舊,deep learning使用的framework無法使用),每次ubuntu的kernel更新後又需要重新安裝時:
sudo ./NVIDIA-Linux-x86_64-545.29.02.run -s --sanity
電腦之前安裝過driver(非透過apt安裝,因為apt提供的driver有時會太過老舊,deep learning使用的framework無法使用),每次ubuntu的kernel更新後又需要重新安裝時:
sudo ./NVIDIA-Linux-x86_64-545.29.02.run -s --sanity
透過 llama.cpp工具進行gguf轉檔時,在轉檔過程中出這樣的錯誤訊息。
這種錯誤源自於token model跟vocabulary檔案的output不同。通常都是vocabulary會因為客製化fine-tune過程中,使用的corpus不同,造成在進行cutomize token時,vocabulary轉變了。但進行fine-tune的人沒有發現這問題,設定檔就對不起來。
work arround的做法就是增補vocabulary檔案。想要看vocabulary資訊跟tokenize model資訊可以從:
from pathlib import Path
from transformers import AutoTokenizer
pad_no = 61952 - 61875 # 這邊放上vocalbulary和token的數量差異tokenizer_model_name = 'Breeze-7B-Instruct-v0.1' # 這邊放上要轉換的模型
model_path = 'output'
new_tokens = [f"<pad{i}>" for i in range(31)]
tokenizer = AutoTokenizer.from_pretrained(tokenizer_model_name, trust_remote_code=True)
tokenizer.pad_token = tokenizer.eos_token
tokenizer.padding_side = "right"
tokenizer.add_tokens(new_tokens)
tokenizer.save_pretrained(Path(model_path))
tokenizer.save_vocabulary(model_path)
每次commit 都會透過gpg驗證簽名。linux上的gpg工具已經很完整了,但是windows上的gpg工具不太完整,需要額外設定。
現在設定git已經安裝完畢。
1. 在ubuntu上無需作業。如果是使用windows,就需要下載gpg工具: https://gnupg.org/download/
2. 設定windows上的gpg使用位置,位置需要修改到gpg安裝的位置:
git config --global gpg.program "C:\Program Files (x86)\GnuPG\bin\gpg.exe"
3. 製作gpg key:
gpg --full-generate-key
裡面會有很多問答,就注意name跟email要跟github上面的帳號符合就可以了。
4. 把gpg public key放到github上。先看看gpg的資訊:
$ gpg --list-secret-keys --keyid-format=long
/Users/hubot/.gnupg/secring.gpg
------------------------------------
sec 4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10]
uid Hubot <hubot@example.com>
ssb 4096R/4BB6D45482678BE3 2016-03-10
gpg --armor --export 3AA5C34371567BD2
這邊會產生以 -----BEGIN PGP PUBLIC KEY BLOCK----- 並以 ---END PGP PUBLIC KEY BLOCK----- 結尾的字串。整段貼到github上:
settings > ssh and gpg keys > gpg keys > new gpg key
( 可參考: https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account )
到這邊,github端就設定完成。
5. client端首先要進行gpg key unset。git看起來有"預設"模式,如果加密的長度跟加密方法跟預設不同就有可能無法讀取。所以最好就重跑一次unset:
git config --global --unset gpg.format
接下來把設定git會使用的gpg key,後面的ID取法就跟上面透過gpg --list-secret-keys --keyid-format=long指令取得的結果一樣,依照上面的例子就是:
git config --global user.signingkey 3AA5C34371567BD2
6. 設定每次都認證:
git config --global commit.gpgsign true
Ref:
https://stackoverflow.com/questions/36810467/git-commit-signing-failed-secret-key-not-available
https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key
https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key
1. windows可以透過內建的ssh建立credential,但是格式跟putty的不太一樣
2.不想要產生太多private key,讓putty可以使用windows ssh建立出來的private key進行認證
到DNS server設定好text屬性後,
1.使用dig指令:
dig yourdomainname.com TXT
只要文字的話:
dig +short -t txt yourdomainname.com
2.使用host指令:
host -t txt yourdomainname.com
ref:
https://www.servercake.blog/check-txt-record-linux-terminal/
如果要進行umount但是出現target buzy sudo fuser -km 掛載點 sudo umount 掛載點 iSCSI重啟 sudo open-iscsi restart 掛載lun iscsiadm -m discovery -t sendtargets -p...