AliceSkyGardenT3
(LLM) A Sparse Activation Architecture for Green Artificial Intelligence: The Energy Efficiency Optimization Language Model AliceSkyGardenT3 Framework Based on Ternary Parameters {-1,0,1}
Install / Use
/learn @Airthrix/AliceSkyGardenT3README
This is a Sparse Activation Architecture for Green Artificial Intelligence: The Energy Efficiency Optimization Language Model AliceSkyGardenT3 Framework Based on Ternary Parameters {-1,0,1}
Due to the involvement of business secrets, it has not been fully open-sourced yet, so I encrypted the framework code to local API. You just need to make sure put ".API_KEY.key" "API_KEY.bin" "API_SAFE.bin" three files in the path.
After adding my ".API_KEY.key" and "API_KEY.bin" in the path, you can directly run python train_vocab.py for training ^^ Enjoy your training (and don't forget to create a data folder and put dataset into it)
python train_vocab.py --resume_checkpoint checkpoint.pth --use_amp
If you have completed the training, you can interact with the command python interact_vocab.py
python interact_vocab.py
When use this ".API_KEY.key" "API_KEY.bin" "API_SAFE.bin" you need:
Python 3.9+ (Recommend 3.10,3.11,3.12)
pip uninstall Crypto
pip install pycryptodome
(Due to API data encryption and compression, volume of modeling_aliceskygarden_t3.py file has been temporarily reduced to 22KB, normal original file size is 89KB. If open sourced in the future, the volume will be the normal 89KB)
Note:
The train_vocab.py here is just an example, but it can run 100% successfully. You can change the loading of the data set from pkl to h5 by yourself. Learning Rate lr is suggested to be increased to 2.6e-5. And the use of vocab.json can be replaced with a tokenizer (I have reserved tokenizer function in my train_vocab.py code).
Compression (Already included in the framework)
model.compress_model_weights().save("compressed_model")
(Before training, The framework will automatically quantify most of the parameters to {-1,0,1}. Finally, compressed_weights.safetensors generated after final training is the weight file with the smallest volume)
Deployment (Already included in the framework)
model = AliceSkyGardenT3ForCausalLM.load_compressed_model("compressed_model", device="cuda")
(If the GPU or CPU supports Ternary Operation in the future, there is no need to call for decompression, just run the original compressed weight file compressed_weights.safetensors directly)
Model Compression Results (7B Parameters)
| Model | Model Size (GB) | Bits/Param | Compression Ratio | |--------------------|:---------------:|:----------:|:-----------------:| | FP32 Baseline | 26.8 | 32.00 | 1.00× | | GPTQ 4-bit | 3.5 | 4.00 | 7.66× | | AliceSkyGardenT3 | 2.1 | 1.58 | 12.76× |
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
