-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63d5c89
commit 19a60a5
Showing
8 changed files
with
308 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# LLAMA2 Chinese | ||
|
||
```SHELL | ||
conda create -n qlllama2 python=3.8 | ||
conda activate qlllama2 | ||
conda deactivate | ||
conda remove -n qlllama2 --all | ||
|
||
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple | ||
|
||
torchrun --nproc_per_node=8 train.py --train_args_file train_args/llama2-13b-ext.yaml | ||
|
||
``` | ||
|
||
## 报错记录 | ||
|
||
* libbitsandbytes_cpu 版本不对导致的 | ||
|
||
```shell | ||
python3.8/site-packages/bitsandbytes/libbitsandbytes_cpu.so: undefined symbol: cquantize_blockwise_fp16_nf4 | ||
``` | ||
用自己的CUDA版本覆盖 | ||
```SHELL | ||
cd python3.8/site-packages/bitsandbytes | ||
cp libbitsandbytes_cuda121.so libbitsandbytes_cpu.so | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Network Namespace 网络命名空间 | ||
|
||
|
||
> 一般情况下,所有数据流量默认通过有线网卡走。然后,对于特定的程序或 Terminal 窗口使用无线网卡,可以通过在启动它们之前设置路由表实现。 | ||
> 这种操作涉及到 Linux 系统的路由管理和命名空间的概念。Linux 命名空间(namespace)是内核的一种特性,可以隔离进程组,使其只能看到特定命名空间中的全局资源。这里我们使用网络命名空间(network namespace)来实现进程网络隔离。 | ||
创建一个新的网络命名空间 | ||
|
||
```shell | ||
sudo ip netns add mynamespace | ||
sudo ip netns list # 查看 | ||
``` | ||
|
||
可以将你的无线网卡连接到新创建的网络命名空间。假设你的无线网卡是 wlan0: | ||
|
||
```shell | ||
sudo ip link set wlan0 netns mynamespace | ||
``` | ||
|
||
可以进入到这个网络命名空间中,并配置网络: | ||
|
||
```shell | ||
sudo ip netns exec mynamespace bash | ||
sudo ifconfig wlan0 up # 启动网卡 | ||
sudo dhclient wlan0 # 网络DHCP | ||
# 无线密码 | ||
sudo wpa_supplicant -B -i wlan0 -c /path/to/your/wpa_supplicant.conf | ||
|
||
# 添加本地回环网络 | ||
sudo ip netns exec mynamespace ip link set lo up | ||
# 设置DNS | ||
sudo nano /etc/resolv.conf | ||
nameserver 8.8.8.8 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.