#] #] ********************* #] "$d_callerID"'0_callerID_SNNs QNial notes.txt' - programming related # www.BillHowell.ca 15Aug2023 initial # view in text editor, using constant-width font (eg courier), tabWidth = 3 see also : "$d_web"'Neural nets/MindCode/0_MindCode & callerID-SNNs.links.txt' #48************************************************48 #24************************24 # Table of Contents, generate with : # $ grep "^#]" "$d_callerID"'0_callerID_SNNs QNial notes.txt' | sed "s/^#\]/ /" # ********************* "$d_callerID"'0_callerID_SNNs QNial notes.txt' - programming related 12Nov2023 update 'callerID-SNNs.html', ready to cite in NN review 31Oct2023 search "How do I write code with a Large Language Model?": Code Llama?? 26Oct2023 search "Linux bit shift" 22Aug2023 fireSeqL handling - all nur fireSeq@timescale above tSyn 21Aug2023 fireL_synSeqA_advance_test 15Aug2023 nur-specific timeScales, factor of 3 or 10 14Aug2023 'MindCode/code test/callerID-SNNs[, - test].ndf' 12Nov2021 Fractal computing languages 24Feb2020 QNial basis 21Feb2020 Initial QNial programming (no more [yap, arm-waving]) #24************************24 # Setup, ToDos, 15Aug2023 create webPage and document-as-I-go 15Aug2023 nur-specific timeScales, factor of 3 or 10 14Sep2023 CIQ-SNN (Sick Sin) CallerID Quantum SNN - ignoring entanglement, many similarities maybe even entanglement? I'm not a fan of Quantum Mechnaics (QM), but it may be fun to play with. 27Oct2023 Use waveform of blurbs, in addition to timing 27Oct2023 Can neurotransmitters act like detonator switches? that activate when a signal incoming? there must be a lot of neuroscience research on that theme 30Oct2023 [rate, condition, state]-based firing only sometimes is rate important, but those situations are important too perhaps initially state-based, then [sequence, rate]? #24************************24 # Principles #24************************24 #08********08 #] ??Nov2023 #08********08 #] ??Nov2023 #08********08 #] ??Nov2023 #08********08 #] ??Nov2023 #08********08 #] ??Nov2023 #08********08 #] ??Nov2023 #08********08 #] 12Nov2023 update 'callerID-SNNs.html', ready to cite in NN review 13Nov2023 continued update htmlHeadings_to_TblOfContents "$d_web"'Neural nets/callerID-SNNs/callerID-SNNs.html' bash "$d_bin"'fileops run webSite.sh' done for now... #08********08 #] 31Oct2023 search "How do I write code with a Large Language Model?": Code Llama?? see "$d_web"'My sports & clubs/SERC systems engng/0_SERC notes.txt' search "How do I write code with a Large Language Model?" +-----+ https://ai.meta.com/blog/code-llama-large-language-model-coding/ Introducing Code Llama, a state-of-the-art large language model for coding August 24, 2023 >> looks VERY interesting, they built a custom LLM for coding, one is specialized for python +-----+ https://mldsai.substack.com/p/introduction-to-large-language-models-991 A Beginner's Guide to Large Language Models and Python for Non-Technical Readers ChatGPT Mar 23 Version. Richard Abrich Apr 8, 2023 >> basic intro, but further postings might help pip install transformers +-----+ https://developer.nvidia.com/blog/how-to-create-a-custom-language-model/ How to Create a Custom Language Model Mar 15, 2023 By Vinh Nguyen Prompt learning for this example uses two open-source components of the NeMo ecosystem: the NeMo OSS toolkit and public NeMo models. >> is this more for general LLMs, as opposed to code-writing? ******** search "How do I build a Private Large Language Model?' +-----+ https://www.analyticsvidhya.com/blog/2023/07/build-your-own-large-language-models/ must log in... #08********08 #] 26Oct2023 search "Linux bit shift" +-----+ https://stackoverflow.com/questions/6385792/what-does-a-bitwise-shift-left-or-right-do-and-what-is-it-used-for What does a bitwise shift (left or right) do and what is it used for? Asked 12 years, 4 months ago Modified 1 year, 11 months ago Viewed 145k times +--+ Left bit shifting to multiply by any power of two and right bit shifting to divide by any power of two. For example, x = x * 2; can also be written as x<<1 or x = x*8 can be written as x<<3 (since 2 to the power of 3 is 8). Similarly x = x / 2; is x>>1 and so on. edited Aug 14, 2020 at 16:12 Peter Mortensen answered Jun 17, 2011 at 12:39 Nitish +--+ Left shift: It is equal to the product of the value which has to be shifted and 2 raised to the power of number of bits to be shifted. Example: 1 << 3 0000 0001 ---> 1 Shift by 1 bit 0000 0010 ----> 2 which is equal to 1*2^1 Shift By 2 bits 0000 0100 ----> 4 which is equal to 1*2^2 Shift by 3 bits 0000 1000 ----> 8 which is equal to 1*2^3 Right shift: It is equal to quotient of value which has to be shifted by 2 raised to the power of number of bits to be shifted. Example: 8 >> 3 0000 1000 ---> 8 which is equal to 8/2^0 Shift by 1 bit 0000 0100 ----> 4 which is equal to 8/2^1 Shift By 2 bits 0000 0010 ----> 2 which is equal to 8/2^2 Shift by 3 bits 0000 0001 ----> 1 which is equal to 8/2^3 edited Aug 14, 2020 at 16:14 Peter Mortensen answered Apr 4, 2016 at 0:30 Raghu +--+ The bit shift operators are more efficient as compared to the / or * operators. In computer architecture, divide(/) or multiply(*) take more than one time unit and register to compute result, while, bit shift operator, is just one one register and one time unit computation. edited Aug 14, 2020 at 16:15 Peter Mortensen answered Jul 22, 2015 at 8:43 Shobhit Raj +--+ Yes, I think performance-wise you might find a difference as bitwise left and right shift operations can be performed with a complexity of o(1) with a huge data set. For example, calculating the power of 2 ^ n: int value = 1; while (exponent> synSeqA_stdFire is wrong, synSeqA_fire is right! oops - synSeqA_advance is wrong... only advances last half changeTo : % calculations ; synSeqA_advance := synSeqA_init ; synSeqA_advance|[, tell (nSynSeq - 1)] := synSeqA_advance|[, 1 + (tell nSynSeq - 1)] ; synSeqA_advance|[, nSynSeq - 1] := o ; % or should it be l??? ; % 21Aug2023 this is WRONG!!! ; futureSynSeqA_res := nNur nSynPat reshape (link (fireL EACHBOTH AND (rows synPatA))) ; synSeqA_fire := synSeqA_advance synSeqA_fire|[, nSynPat + (tell nSynPat)] := futureSynSeqA_res EACHBOTH OR synSeqA_fire|[, nSynPat + (tell nSynPat)] ; change : synSeqA_advance|[, tell (nSynSeq - 1)] := synSeqA_advance|[, 1 + (tell nSynSeq - 1 )] ; to : synSeqA_advance|[, tell (nSynSeq - 1)] := synSeqA_advance|[, 1 + (tell (nSynSeq - 1))] ; for nur@2 looooollllolooloolooooollollooolloolollo synSeqA_init ooooollllolooloolooollllllloolllollllloo synSeqA_stdAdvance ooooollllolooloolooooollollooolloololloo synSeqA_advance >> Ah Hah! change synSeqA_stdAdvance! also for synSeqA_stdFire chage : fLog writefile picture synSeqA ; synSeqA_fire|[, nSynPat + (tell nSynPat)] := futureSynSeqA_res EACHBOTH OR synSeqA_fire|[, nSynPat + (tell nSynPat)] ; to : fLog writefile picture synSeqA_fire ; synSeqA_fire|[, nSynPat + 1 + (tell nSynPat)] := futureSynSeqA_res EACHBOTH OR synSeqA_fire|[, nSynPat + 1 + (tell nSynPat)] ; | ooooollllolooloolooooollollooolloololloo synSeqA_advance lloollloolooololoooo futureSynSeqA_res ooooollllolooloolooollllllloolllollllloo should be - changed in synSeqA_stdFire looooolllloloolooloollolllllololllolollo synSeqA_stdFire WRONG! ooooollllolooloolooooollollooolloololloo synSeqA_fire WRONG! changeBack to : synSeqA_fire|[, nSynPat + (tell nSynPat)] := futureSynSeqA_res EACHBOTH OR synSeqA_fire|[, nSynPat + (tell nSynPat)] ; >> but previous expression should have given an error!!??? - out of bounds...??? Now - change fireL_synSeqA_advance IS - given fireL, FIFO advance ALL synSeqA of ALL nur #08********08 #] 15Aug2023 nur-specific timeScales, factor of 3 or 10 08********08 #] 14Aug2023 'MindCode/code test/callerID-SNNs[, - test].ndf' +-----+ olde code # olde code # % write 'post (spkSeq spkPat) : ' ; # % write post (spkSeq spkPat) ; # spkSeqMatchL := EACH AND spkSeq_in_spkPat ; # % write 'spkSeqMatchL = ' spkSeqMatchL ; # OR spkSeqMatchL # spkSeq_in_spkPat := spkPat subList spkSeq ; # write spkSeq_in_spkPat ; # EACH AND spkSeq_in_spkPat # nSeq_spkPatL_spkTimeFrac_makeRdm_spkPatNew IS OP nSeq spkPatL spkTimeFrac spkPatNew # not used? # nSeq_spkTimeFrac_spkPatL_makeRdm_spkPat IS OP nSeq spkTimeFrac spkPatL { LOCAL ; % ; WHILE } % generate nSpkPat random spkPat, each of length nSeq ; spkPatL := null ; FOR i WITH (tell nSpkPat) DO spkPatL := append spkPatL (nSeq_makeRdm_spkSeq patTimeFrac nSeq) ; ENDFOR ; # from initial test # callerID_SNNs_test IS OP nSeq nSpkPatL nSpkSeqL patTimeFrac seqTimeFrac # callerID_SNNs_test IS OP 40 5 30 0.5 0.5 # nSpkSeqL = 20 19 14 22 17 17 28 18 18 16 18 15 22 18 20 27 26 20 20 21 15 19 20 20 26 16 22 16 15 24 # sum nSpkSeqL / 30 = 19.6333 # >> OK # firMatchL = # |ooooo|ooooo|ooooo|ooooo|ooooo|ooooo|ooooo|ooooo|ooooo|ooooo|ooooo|ooooo # |ooooo|ooooo|ooooo|ooooo|ooooo|ooooo|ooooo|ooooo|ooooo|ooooo|ooooo|ooooo # |ooooo|ooooo|ooooo|ooooo|ooooo|ooooo|loooo|olooo|ooloo|ooolo|ooool| # >> OK - works! # callerID_SNNs_test IS OP 40 5 30 0.5 0.5 % fRes writefile timestamp_YYYY_MMM_DD_HH_MM_weekDay ; % fRes writefile timestamp_YYYY_MMM_DD_HH_MM_weekDay ; fRes EACHRIGHT writefile (EACH link LEAF string seqMatchL) ; fRes writefile '' ; fRes EACHRIGHT writefile (EACH link LEAF string seqMatchL) ; % ; % dif test against std output ; pStd := link d_MindCodeTest 'nSeq_patFrac_seqFrac_matchTest std.txt' ; pDif := link d_MindCodeTest 'nSeq_patFrac_seqFrac_matchTest dif.txt' ; cmd := link 'diff "' pStd '" "' pRes '" --suppress-common-lines >"' pDif '" ' ; host cmd ; 08********08 #] 12Nov2021 Fractal computing languages see "$d_webRawe"'Software programming & code/Fractal comptr languages/0_Fractal notes.txt' #08********08 #] 24Feb2020 QNial basis see link d_QNial_mine 'MindCode/1_MindCode summary ref.txt' to test spiking, I must build some microNNs but first build a few basic arithmetic operators #08********08 #] 21Feb2020 Initial QNial programming (no more [yap, arm-waving]) Izhikevich-like neuron - with [DNA-mRNA-epi, addressable synapses] loaddefs link d_QNial_mine 'MindCode/Izhikevich-like neuron - with [DNA-mRNA-epi, addressable synapses].ndf' # enddoc