harrisonvanderbyl / rwkv-cpp-accelerated

A torchless, c++ rwkv implementation using 8bit quantization, written in cuda/hip/vulkan for maximum compatibility and minimum dependencies
MIT License
306 stars 19 forks source link

Use mmap to load the weights #14

Closed howard0su closed 1 year ago

nenkoru commented 1 year ago

Result is after a few re-runs: 1B5 this PR: Loading time 1.9288136959075928s current main: Loading time 1.9180498123168945s

3B this PR: Loading time 2.8054773807525635s current main: Loading time 2.8033857345581055s

Unable to run 7b with this PR due to not having an optinization of an embed layer being on CPU

palit 3060ti 8gb 128GB of DDR4 RAM Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb invpcid_single pti intel_ppin ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust b mi1 avx2 smep bmi2 erms invpcid cqm xsaveopt cqm_llc cqm_occup_llc dtherm ida arat pln pts md_clear flush_l1d