LLMs Under the HoodBarry S. StahlPrincipal Engineer - AZNerds.net@bsstahl@cognitiveinheritance.comhttps://CognitiveInheritance.com |
|
Favorite Physicists
Other notables: Stephen Hawking, Edwin Hubble, Leonard Susskind, Christiaan Huygens |
Favorite Mathematicians
Other notables: Daphne Koller, Grady Booch, Leonardo Fibonacci, Evelyn Berezin, Benoit Mandelbrot |
|
|
|
|
|
|
|
|
|
A neural network model that learned dense vector representations of words
|
|
|
|
|
|
|
|
|
|
|
GPT-3 and beyond use the
|
|
|
|
|
Reference Implementation - AI Demos on GitHub
|
|
|
|
Article: Depth of GPT Embeddings
Note: For normalized vectors, cosine similarity is the same as the dot-product |
|
|
|
|
|
Step 1: Download LM Studio
Step 2: Install the Embedding Model
nomic-embed-text-v1.5-GGUFnomic-aiStep 3: Verify Installation
curl http://localhost:1234/v1/embeddings \
-H "Content-Type: application/json" \
-d '{
"model": "nomic-embed-text-v1.5",
"input": ["This is a test sentence."]
}'
| Feature | Example |
|---|---|
| Synonym | "Happy" is closer to "Joyful" than to "Sad" |
| Language | "The Queen" is very close to "La Reina" |
| Idiom | "He kicked the bucket" is closer to "He died" than to "He kicked the ball" |
| Sarcasm | "Well, look who's on time" is closer to "Actually Late" than "Actually Early" |
| Homonym | "Bark" (dog sound) is closer to "Howl" than to "Bark" (tree layer) |
| Collocation | "Fast food" is closer to "Junk food" than to "Fast car" |
| Proverb | "The early bird catches the worm" is closer to "Success comes to those who prepare well and put in effort" than to "A bird in the hand is worth two in the bush" |
| Metaphor | "Time is money" is closer to "Don't waste your time" than to "Time flies" |
| Simile | "He is as brave as a lion" is closer to "He is very courageous" than to "He is a lion" |
|
|
Grouping data into categories based on features of each item
|
|
Mapping user and system text to validated, known-safe representations to ensure consistent behavior and defend against prompt injection
|
|
Determines if the input is an affirmative or negative response to a question
Determines the emotional tone of a response
|
|
|
|
|
|
|
|
|
The 3 matrices that are learned in training of the attention mechanism
Multiplying these matrices by the positionalized input adds the appropriate context to each token |
|
|
|
|
|
|
|
|
|
System: As a resume scanner specializing in software engineers, focus solely on summarizing their key skills and experience durations, omitting demographics like age and location.
User: [Submits appropriate resume]
Assistant:
- Expertise in Java, J2EE, Spring Framework, Hibernate
- Experience with front-end technologies such as HTML, CSS, JavaScript, and AngularJS
- Proficient in SQL databases and ORM technologies
- Familiar with containerization and orchestration tools like Docker and Kubernetes
- Strong understanding of software design patterns and best practices
- Excellent problem-solving abilities and attention to detail
- Effective team player with strong communication skills
**Experience:**
- Senior Java Developer at XYZ Tech Solutions (June 2016 – Present, 5 years)
- Java Software Engineer at Innovative Software Co. (May 2012 – May 2016, 4 years)
**Certifications:**
- Oracle Certified Professional, Java SE 8 Programmer
- Certified ScrumMaster (CSM)
**Education:**
- Bachelor of Science in Computer Science, University of Technical Excellence (Graduated: May 2012)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Consider carefully what context matters to your users
How can we leverage these tools to create amazing experiences for our users?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
curl or Postman
|
|
|
|
|
|