GenAI Courses
LLM courses on Neo4j Graph Academy
https://graphacademy.neo4j.com/courses/llm-fundamentals/
https://graphacademy.neo4j.com/courses/llm-chatbot-python/
https://graphacademy.neo4j.com/courses/llm-chatbot-python/
https://www.youtube.com/@neo4j/playlists
Semantic Kernel
https://www.linkedin.com/learning/introducing-semantic-kernel-building-ai-based-apps/what-is-semantic-kernel
https://github.com/microsoft/semantic-kernel/tree/main/python/notebooks
https://github.com/microsoft/globalopenaihack/tree/main/SemanticKernel
Intel
https://learn.activeloop.ai/courses/llms
https://www.intel.com/content/www/us/en/developer/topic-technology/artificial-intelligence/training/overview.html
Databricks
https://www.databricks.com/resources/learn/training/generative-ai-fundamentals
Nvidia
https://www.nvidia.com/en-in/training/online/ Select tab "Generative AI / LLM"
https://www.nvidia.com/en-us/events/llm-developer-day/
Other relevant websites
https://www.classcentral.com/
https://www.careers360.com/
https://www.mooc-list.com/
Semantic Kernel
Semantic Kernel is an Application Framework (SDK) by Microsoft. It is used to develop many co-pilot software e.g. github co-pilot. Other such frameworks are:
- Semantic Kernel (Microsoft)
- LangChain (Open Source)
- FIXIE (Enterprise Grade)
- Vertex AI (Google cloud)
- griptape
- HumanLoop
- Beam
=========================================================
Semantic Kernel has (1) skill (2) prompts (3) AI Services (4) Connector (5) Kernel (6) Planner (6) Plugins
Skill is a set of functions.
The functions are divided in two types
1. Semantic Functions : User defined functions
2. Native Functions: It has core_skills like TextMemory, ConversationSummary,
FileIO, HTTP, Math, Text, Time, Wait (calendar etc.)
Kerenel class has RunAsync method. It has 1+ SKFunction objects
Prompt has (1) skprompt.txt (2) config.json
AI Services
- ChatCompletion
- Embeddings
- Embeddings.VectorOperations
- ImageGenerations
- TextGenerations
- HuggingFace Interface API
- HuggingFace Local
- Oobabooga
- OpenAI
- OpenAI.Azure
- AzureCognitiveSearch
- Chroma
- DuckDB
- Kusto
- Pinecone
- Postgress
- Qdrant
- Redis
- Sqlite
- Weaviate
- AI Service
- Template Engine
- Logger
- Plugins
- Kernel Config Class
- BasicPlanner: A simplified version of SequentialPlanner that strings together a set of functions.
- ActionPlanner: Creates a plan with a single step.
- SequentialPlanner: Creates a plan with a series of steps that are interconnected with custom generated input and output variables.
- StepwisePlanner: Incrementally performs steps and observes any results before performing the next step.
- MSGraph (C#)
- Document and Data Loading (only word in C#)
- OpenAPI (C#)
- Web Search Engine
- Text Chunkers
- The memory is constructed every time during setup.
https://medium.com/@kcwayne1219/exploring-microsoft-semantic-kernel-a-newbie-developers-journey-902f58091504
- Loading hugging face model
https://stackoverflow.com/questions/77110608/loading-a-huggingface-model-with-microsofts-semantic-kernel-in-c-sharp-vb-net
https://github.com/microsoft/semantic-kernel/blob/3451a4ebbc9db0d049f48804c12791c681a326cb/samples/apps/hugging-face-http-server/inference_app.py
https://github.com/microsoft/semantic-kernel/blob/3451a4ebbc9db0d049f48804c12791c681a326cb/samples/apps/hugging-face-http-server/utils/create_responses.py
- Add Support for running local models using Ollama
Github
https://github.com/microsoft/semantic-kernel/tree/c4ef6ab227fc967ab12291cc862852e66d6d75ae
Documentation
https://github.com/MicrosoftDocs/semantic-kernel-docs/tree/main
Reference
https://devblogs.microsoft.com/semantic-kernel/page/5/
https://build.microsoft.com/en-US/sessions/31e11443-70d3-4020-8c8c-0a654bccd233
Vector DB and GenAI Stack
Vector DB is an important part of genAI stack. It is useful for word embedding.
In simple terms, "Word embedding" : encode each word from training set as vector. It is a representation of a word. It encodes the meaning of the word in such a way that words that are closer in the vector space are expected to be similar in meaning. It is useful for syntactic parsing and sentiment analysis. The whole vocabulary is vector DB. It is useful for sequence prediction.
How Word Embedding works? The OpenAI word embedding model lets you take any string of text (up to a ~8,000 word length limit) and turn that into a vector with 1536 dimension. So word has 1,536 floating point numbers as attributes. These floating point numbers are derived from a sophisticated language model. They take a vast amount of knowledge of human language and flatten that down to a list of floating point numbers. 4 bytes per floating point number that’s 4*1,536 = 6,144 bytes per word embedding—6KiB.
Here is the curl command to invoke API
curl https://api.openai.com/v1/embeddings \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -d '{"input": "Your text string goes here", "model":"text-embedding-ada-002"}'
https://platform.openai.com/docs/api-reference/embeddings/object
The word embedding is stored in vector index
Use Cases
- Search (where results are ranked by relevance to a query string)
- Clustering (where text strings are grouped by similarity)
- Recommendations (where items with related text strings are recommended)
- Anomaly detection (where outliers with little relatedness are identified)
- Diversity measurement (where similarity distributions are analyzed)
- Classification (where text strings are classified by their most similar label)
Similarity
1. cosine similarity
It only gives direction
cosine = dot product / magnitude
= (x1*y1 + x2*y2 +.... x1536*y1536) / (square root of (x1*x1 + x2*x2 +... x1536*x1536) * square root of (y1*y1 + y2*y2 +... y1536*y1536) )
Facebook AI research has optimized version https://github.com/facebookresearch/faiss
https://en.wikipedia.org/wiki/Cosine_similarity
2. Euclidian similarity
Vector DB Example:
- Chroma, an open-source embeddings store
- Elasticsearch, a popular search/analytics engine and vector database
- Milvus, a vector database built for scalable similarity search
- Pinecone, a fully managed vector database
- Qdrant, a vector search engine
- Redis as a vector database
- Typesense, fast open source vector search
- Weaviate, an open-source vector search engine
- Zilliz, data infrastructure, powered by Milvus
- drant, activeloop, pgvector, momento, Neo4j, Casandara (CaasIO library)
- Postgres https://innerjoin.bit.io/vector-similarity-search-in-postgres-with-bit-io-and-pgvector-c58ac34f408b
https://collabnix.com/getting-started-with-genai-stack-powered-with-docker-langchain-neo4j-and-ollama/
https://github.com/docker/genai-stack
https://www.docker.com/press-release/neo4j-langchain-ollama-launches-new-genai-stack-for-developers/
https://neo4j.com/developer-blog/genai-app-how-to-build/
https://www.youtube.com/watch?v=fWUzSMzSAU0
Contianers
1. langchain bot.py (streamlit for UI) FastAPI, sevlte
It has application logic and data flows
2. ollama sentence_transformer
3. neo4j
4. ollama llama2
Ollama manage local LLMs
it seems llm is another tool similar to ollama
https://datasette.io/tools/llm
Another GenAI stack, where (1) GPT4 is used instead of ollama+llama2 and (2) ChromaDB is used instead of Neo4J https://medium.com/@rubentak/unleashing-the-power-of-intelligent-chatbots-with-gpt-4-and-vector-databases-a-step-by-step-8027e2ce9e78 and https://github.com/rubentak/Langchain/blob/main/notebooks/Langchain_doc_chroma.ipynb
Nadiad
I was aware about only college road, during my initial few years at Nadiad. Later on, I researched various reading materials and explored Nadiad. I came across many less known facts about Nadiad. I presented my speech about Nadiad as part of oral communication subject in MBA.
Nadiad Means...
N - Novel
A - Aspired
D - Divine
I - Impressive
A - Admired By All
D - Dignified
Nadiad is Known for:
- Its old name was નટીપ્રદ Natiadra / Natiprada and later on નટપુર Natpur.
- Once upon a time, Nadiad was known as city of scholars SAAKSHAR-BHOOMI. સાક્ષર ભૂમિ As Nadiad was the center of literary and cultural activities in Gujarat in the late 19th century.
- Center place of Charotar (Charotar literally means 'More Beautiful')
Key Facts
* First ST bus stop (known as old ST bus stop during 1990s).
* Vegetarian Puf was invented at Shreyas Bakery, Nadiad
* Mogul Azam movies's popular song "Mohe Nadhat Pe Nandlal" was written by Nadiad's Rasakavi Radhunath Brahmbhat
* 9 BHAAGOL : Entry/exit towards 9 different cities / villages. All BHAAGOL had gates
1. AMADAAVAADI અમદાવાદી ભાગોળ
2. MARIDAA મરીડા ભાગોળ
3. SALOON સલૂણ ભાગોળ
4. CHAKALAASHI ચકલાશી ભાગોળ
5. DOOMRAL ડુમરાલ ભાગોળ
6. PIJA પીજ ભાગોળ
7. DABHAAN ડભાણ ભાગોળ
8. KODI-VAADAA કોળી-વાડા ની ભાગોળ
9. BILODARAA બિલોદરા ભાગોળ
* 9 Lakes :
1. Kund કુંડ
2. SERA સેર
3. RATANA રતન
4. KHETAA ખેતા
5. MULESHWARA મૂળેશ્વર
6. OONDEVAAL ઊંડેવાળ
7. MALAAV મલાવ
8. NAANAA KAAMANAATH's SMASHAAN VAALU TALAAV નાના કામનાથ નું સ્મશાન વાળું તળાવ
9. KALAKAA MAATAA NI TALAAVADI કાળકા માતાની તળાવડી
* Birthplace of scholars in literature (SAAKSHAR સાક્ષર )
1. Govardhanram Tripathi ગોવર્ધનરામ ત્રિપાઠી. Author of Saraswati Chandra Novel. There is a Bollywood movie also based on this novel, with same name. Remember the song? FOOL TUMHE BHEJAA HAI KHAT ME...?
2. Manilal Dvivedi મણિલાલ દ્વિવેદી,
3. Balashankar Kanthariya બાલાશંકર કંથારીયા, ,
4. Manshukhram Tripathi મનસુખરામ ત્રિપાઠી,
1. Sardar Vallabhbhai Patel
2. Indulal Yagnik ઇન્દુલાલ યાજ્ઞિક
3. Ambalal Jani અંબાલાલ જાની
4. Chandrashankar Pandya ચંદ્રશંકર પંડ્યા
5. Bakul Tripathi બકુલ ત્રિપાઠી Gujarat's legendary comedian
6. Ex-CM of Gujarat Babubhai Jashbhai Patel
Places worth to visit
* A. Sau. Daahi Lakshmi Library (SAMADI CHAKALA) in memory of wife of Mana:Sukhram Tripathi. It has more than 46000 books and 1600 manuscripts since 12th century in Sanskrit, Magadhi, Hindi, Gujarati
* Santram Temple: Santram Maharj is incarnation of Lord Dattatray. The temple runs many social services. In 1990s, It was also providing change for Indian currency notes. Now, this is era of UPI and QR Code. Santram Maharaj is like DSP of Nadiad, as He imparts ethics and values in Nadiadi people. Here GuruPurnima , MAHAA month full moon day and many other festivals are celebrated. It has 11 large halls.
* Santram DERI/dERI. So many people visit it on every Thursday.
* Mai Temple. A big statue of Lord Shiva. Near the railway line. (Another branch of this temple is on college road.) YANTRA PUJAA is performed at only two places in entire India. This temple is one of them.
* Viththal Girls School: Training for becoming self dependent
* Hindu Anaathaashram. I visited this place, after returning from industrial visit to GE Lighting (SEEMA bulbs and Tubes).
* Baalakanji-Baari (BAALAKAANJI BAADI in Sindhi means VAADI of children)
* Hari Om Ashram by saint Pujya MOTAA. ( I did one week silence SAADHANAA here).
* MUKTI DHAAM crematorium
* Townhall. I visited it to attend (1) poets meet and (2) a program of MAAN માણ (musical instrument) playing
* Deaf and Dumb school
* Vedaant Bhavan (at Kansaraa Waad)
* Laakhi mosque ( at Vahora Waad)
* Shri Paisa VaaLaa Vaid NU DAVAAKHAANU
* Saradar Patel SMRUTI BHAVAN. It has 200 years old records
* Sports Complex
* Nadiad is famous for many hospitals, Industries, Colleges, Temples. I have not included all of them here. I am not sure, about present situation of above places also.
* Newly added attraction BAPS Swaminarayan Temple , at "Yogi Farm", PIPALAGA Road.
Reference:
* Abhiyaan Weekly Magazine. Issue 18th December 1995
* Charotar SarvaSangra. KHAND PAHELO, VIBHAAG BIJO.
Importance of Satsang
सत्सङ्गत्वे निस्सङ्गत्वं
निस्सङ्गत्वे निर्मोहत्वम् ।
निर्मोहत्वे निश्चलितत्त्वं
निश्चलितत्त्वे जीवन्मुक्तिः ॥
भज गोविन्दं भज गोविन्दं
भज गोविन्दं मूढमते ।
भज गोविन्दं 9
satsaṅgatve nissaṅgatvaṃ
nissaṅgatve nirmohatvam ।
nirmohatve niścalitattvaṃ
niścalitattve jīvanmuktiḥ ॥
bhaja govindaṃ bhaja govindaṃ
bhaja govindaṃ mūḍhamate ।
Bhaja Govindam 9
Streaming of CLI session
https://github.com/elisescu/tty-share https://tty-share.com/
https://github.com/qnkhuat/tstream
OpenAPI Text to Speech
https://github.com/simonw/ospeak
https://simonwillison.net/2023/Nov/7/ospeak/
https://platform.openai.com/docs/guides/text-to-speech
CLI tool for running text through the OpenAI Text to speech API and speaking or saving the result
Python Notebook
https://realpython.com/jupyter-notebook-introduction/
https://openclassrooms.com/en/courses/2304731-learn-python-basics-for-data-analysis/7978803-take-your-first-steps-with-jupyter-notebook
https://www.shiksha.com/online-courses/how-to-use-google-colab-for-python-course-grlel861
https://www.geeksforgeeks.org/how-to-use-google-colab/
AI ML Useful YouTube channels
K8sGPT
Default AI backend OpenAI. LocalAI can also used.
Built in analyzers
Enabled by default
- podAnalyzer
- pvcAnalyzer
- rsAnalyzer
- serviceAnalyzer
- eventAnalyzer
- ingressAnalyzer
- statefulSetAnalyzer
- deploymentAnalyzer
- cronJobAnalyzer
- nodeAnalyzer
- mutatingWebhookAnalyzer
- validatingWebhookAnalyzer
Optional
- hpaAnalyzer
- pdbAnalyzer
- networkPolicyAnalyzer
https://itnext.io/k8sgpt-localai-unlock-kubernetes-superpowers-for-free-584790de9b65
https://github.com/k8sgpt-ai/k8sgpt
https://github.com/k8sgpt-ai/k8sgpt-operator
https://www.youtube.com/watch?v=PKrDNuJ_dfE
GenAI Part 2
To understand any Github Repo. Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code
https://app.getonboardai.com/
=========================================================
Langchain
https://github.com/kyrolabs/awesome-langchain
=========================================================
Model file
extension: HF, GPTQ, GGML, BIN and GGUF.
Each model needs 4 files (with example content)
File 1 - The model's GGUF file
File 2 - The model's .yaml file
backend: llama
context_size: 2000
name: lunademo
parameters:
model: luna-ai-llama2-uncensored.Q4_K_M.gguf
temperature: 0.2
top_k: 40
top_p: 0.65
roles:
assistant: 'ASSISTANT:'
system: 'SYSTEM:'
user: 'USER:'
roles:
assistant: 'ASSISTANT:'
system: 'SYSTEM:'
user: 'USER:'
File 3 - The Chat API .tmpl file
{{.Input}}
ASSISTANT:
Complete the following sentence: {{.Input}}
File 4 - The Completion API .tmpl file
=========================================================
Local Deployment of GenAI
1. https://github.com/cocktailpeanut/dalai
2. GPT 4 all https://gpt4all.io/index.html https://github.com/nomic-ai/gpt4all
3. vLLM library https://vllm.readthedocs.io/en/latest/#
4. API store https://gorilla.cs.berkeley.edu/ and https://github.com/ShishirPatil/gorilla
5. https://github.com/imartinez/privateGPT and https://docs.privategpt.dev/ Based on PrivateGPT https://github.com/marella/chatdocs
6. https://github.com/Lightning-AI/lit-gpt based on nanoGPT
7. https://github.com/Vision-CAIR/MiniGPT-4/tree/main and https://minigpt-4.github.io/ https://huggingface.co/spaces/Vision-CAIR/minigpt4 https://www.youtube.com/watch?v=__tftoxpBAw
8. https://collabnix.com/running-ollama-2-on-nvidia-jetson-nano-with-gpu-using-docker/
9. Langchain
https://python.langchain.com/docs/guides/local_llms
10. Casandra DB
https://cassio.org/frameworks/langchain/qa-basic/
https://colab.research.google.com/github/CassioML/cassio-website/blob/main/docs/frameworks/langchain/.colab/colab_qa-basic.ipynb
11. gtr-t5-large model is around 640 MB
https://til.simonwillison.net/python/gtr-t5-large
=========================================================
Local Document search
1. https://github.com/h2oai/h2ogpt
2. https://github.com/imartinez/privateGPT and https://docs.privategpt.dev/ OR https://github.com/SamurAIGPT/EmbedAI
3. https://github.com/PromtEngineer/localGPT
4. LocalAI
https://localai.io/
https://github.com/mudler/LocalAI
https://github.com/go-skynet/helm-charts/tree/main/charts/local-ai and https://localai.io/basics/getting_started/index.html#run-localai-in-kubernetes
https://localai.io/basics/build/index.html
integration with Logseq https://github.com/briansunter/logseq-plugin-gpt3-openai
How Tos https://localai.io/howtos/
https://localai.io/howtos/easy-request-openai/
Access
https://localai.io/howtos/easy-model-import-downloaded/
https://localai.io/howtos/easy-request-curl/
All Git Repo https://github.com/lunamidori5
5. https://mudler.pm/posts/localai-question-answering/
6. GPT3 and datasette
https://simonwillison.net/2023/Jan/13/semantic-search-answers/
Kalady and Kochi
First time I am writing Travel blog. This is about my recent visit to Kalady, Kerala.
Kalady means footprint. Footprint of Adi Shankaracharya. The Poorna river followed Adi Shankaracharya, wherever He goes. Now Poorna rive is renamed as Periyar river. (The footprint reminded me about Jaeger tracing. It is a distributed tracing platform released as open source by Uber Technologies. It captures footprint of communication among microservices.)
Coming back to subject. There must be enough materials about all city, sightseeing places, etc. I am just sharing here, my experience, photos, videos and take away points.
I visited Kalady to attend Advance Meditation Course at The Art of Living Ashram, Kalady. I noticed "Adi Sankara Keerthi Sthambha Mandapam" on the way from Railway Station to Ashram. The Ashram is really nice place. When Guruji Sri Sri Ravishankar came to ashram to inaugurate, He acknowledge that this land has special positive vibrations. It is miniature version of The Art of Living Bangalore ashram. Here, meditation Mantap is amazing. Just sit there, close eyes and you easily enters in the world of meditation. Nice full size painting of Radha Krishna. Have a look:
The course was awesome, as usual. The special attraction were:
* birth place of Adi Shankaracharya
* NADI PUJA (worshiping the Poorna river)
* GAU PUJA (worshiping the cow)
* sightseeing
The people at Ashram, perform regular NADI PUJA, GAU PUJA, RUDRA PUJA, GURU PUJA etc. We also attended the same. Here are few photos about NADI PUJA
and GuaPuja.
Watch this video to know more about Gau Puja.
Vallamkali: boat race, is Kerala's famous tradition. Samskrit Bharati has a nice Sanskrit song, on the tune of 'song played during boat race'. I sang that Sanskrit song during travelling to Lower Sholayar dam. Here is an old video of the song.
Here are few photos of Lower Sholayar dam trip.
On first day, before silence starts, we visited "Adi Sankara Keerthi Sthambha Mandapam".
We saw 3D pictures about life story of Adi Sankaracharya. I really felt proud to be at India and being Indian. Such a great scholar, person Adi Sankaracharya walked on this land. He was real architect of modern India. He visited pilgrimage places across India, spread ADVIATA knowledge.
Some of the pictures reminded me (1) Pandit Mandan Misra and Trotakacharya related episodes of Upnishad Ganga TV serial on Doordarshan.
(2) Gurupuja chanting.
Look at this nice 3D statue about Shrimad Bhagavd Gita
We also visited Janmabhoomi Kshetra.
At Janmabhoomi Kshetra, some BHRAMCHAARIs were chanting in a group. We visted beautiful temples crocodile GHAAT etc.
There was a nice DHANVANTARI temple, at just walkable distance from Ashram.
Next to Ashram, there is a pineapples farm. Have a look
Our course was just before ONAM festival. We celebrated ONAM also. To be in Kerala during Onam festival is like, to be in Gujarat during Navaratri festival. Local people : men, women and kids visited ashram in colorful traditional dress, danced, played and celebrated. We participated silently. We had Flower Rangolis (Pookkalam) and special food Onam sadya (feast).
On the last day of course, we visited a temple, and had boat riding at nearby lake. Some of us, did shopping.
Next day, we attended Rudra Puja at ashram.
Some of my advance course classmates had blissful DARSHAN of Guruvayur temple. I visited Kalady and Kochi city. I visited Sri Ramakrishna Advaita Ashram. It has its own school also in same campus.
Nice Prasdam of fruits at Sri Ramakrishna Advaita Ashram.
Lakshmi Bhavan restaurant is really good place, to have vegetarian food with reasonable price. I strongly recommend the place. Many people have appreciated it at Google map.
Lakshmi Bhavan restaurants is near Sanskrit University, Kalady Junction.
While travelling towards Kochi city, I realised that greenery in Bangalore is nothing compare to Kochi. In middle of green forest, there are big buildings. I reached metro station and bought pass for whole day. I could not visit famous Shankar temple, as it was closed. Chinmay mission was also closed, due to Onam festival.
There are many offers, discount at Lulu mall. Let's see inside India's largest mall.
Have a look to Onam Celebration at LuLu mall.
Apart from Lulu mall, I visited Rainbow hanging bridge.
Look at this nice art, inside a metro station, near the bridge.
There are around 50 places to visit in Kochi. I selected few of them based on my interest. The Kochi airport is really unique. The best part is, it is powered by solar energy. There is solar energy farm near the airport.
Note:
I provided Google Map link, wherever possible. One can access many photos from Google map. I have added selifie photos in this blog. I have avoided group photos as well, respecting privacy of my Advance Course Meditation classmates
So, how is my first travelling blog? Comments, suggestions are always welcome.