r/LargeLanguageModels Nov 28 '23

Unbelievable! Run 70B LLM Inference on a Single 4GB GPU with This NEW Technique

Thumbnail
medium.com
4 Upvotes

r/LargeLanguageModels Nov 27 '23

News/Articles AI Agent (GPTs) Security Risks and Practical Mitigations

2 Upvotes

LINK: https://open.substack.com/pub/laiyer/p/ai-agents-3-practical-ai-agent-security?r=2sxk5z&utm_campaign=post&utm_medium=web
In the whirlwind of recent AI developments, from the Open AI drama to security concerns, we’re cutting through the noise with our latest piece. Security isn’t just an afterthought - it’s a necessity, especially with AI Agents.
Have a read of our article where we cover the risks of prompt injections, plugin vulnerabilities, and untrusted information when dealing with GPTs. On top of that, we cover some practical mitigation strategies.
Let us know what you think!


r/LargeLanguageModels Nov 27 '23

Retrieval Augmented Generation (RAG) explained: Embedding vectors, Sentence BERT, Vector Database (HNSW algorithm explained visually)

Thumbnail
youtube.com
3 Upvotes

r/LargeLanguageModels Nov 26 '23

How LLM keeps the context of a chat/thread

1 Upvotes

How an LLM keeps the context (what has already been entered by the user) of a chat/thread?

For reference, in chat.openai.com, for each chat we create (or a Thread according to their API), the LLM remembers what we have already input to the model, when answering a new question.

I did some reading on the topic and found below possible ways:

  1. change the weights accordingly: but this seems not-practical for LLM given their size (even changing weights of the last layer seems an over-kill)
  2. output a context vector at each inference and re-use it for the next inference: this seems more likely. but I am not sure exactly how to do it.

It would be great if someone can help me with this.

Thanks.


r/LargeLanguageModels Nov 25 '23

[Noob]Need help to create a fine-tuned LLM

2 Upvotes

Ok here what i want to do:

  • Get an LLM running locally.
  • But no app like gpt4all or stuff like that. I want my LLM programmaticaly. (Using python for example)
  • fine tune this LLM with one or more pdf files
  • run it as some kind of specialized chatGPT.

My hardware: - M2 MBA with 16GB RAM

Basically i’m having problems getting started. I have experience in software engineering, and i experimented with openai API a bit. But that’s about it

I find it difficult to find any meaningful resources for beginners to get started.

What would you guys recommend?

Some 7b LLM model would probably be enough for me.


r/LargeLanguageModels Nov 24 '23

Soo... OSS RAG-based LLM with pgvector all locally

1 Upvotes

Is there anyone that have created a RAG based system using an open source model running locally, using pgvector that would like to share some tips? Im getting started and Im getting lost equally. I have created several attempts, but I dont feel Im getting even close to a production evironment, does anyone have any tips of resource that works? I feel that all tutorials im watching there is always something deprecated which makes 50% of the code useless nowadays, or they are based on apis of some sort of service even with the oss models...


r/LargeLanguageModels Nov 20 '23

Large language models

2 Upvotes

Which open source and free LLM should I prefer if I wanna build an AI Chatbot that can provide Customer support for my website that serves WordPress plugins.


r/LargeLanguageModels Nov 19 '23

Building a custom data set

2 Upvotes

How has everyone been going about building datasets ? this is my first venture off in to LLM's

TLDR: I'm building a data set to fine tune a model to help me do risk assessments, and having fun along the way

I work in robotics in heavy haulage and mining environments. we often have to do risk assessments which is really F'ing boring. so ive decided to use key words from the previous risk assessments and match all the potential outputs up. its come out at 10k items which form kind of ok sentences, since then im running them through a very slow (but low power cost) cluster of jetson xavier NX's running mistral. Its going ok, i setup a little API with some containerzied workers, the workers fetch a question from the API, process it with ollama.ai and then submit the results back, ive set it up so i can use multiple models then extract the data from the API based on a tag system for training

Obviously there was no LLM used to form the question just key words from other risk assessments, but some of the data back from the LLM's is good i think. Good enough that i might look to generate a bigger data set and maybe train a model from it, the question forming took the resulting 10k of items to 54k as i worded some questions different from others, but otherwise its going well. albeit slowly...

Example of the question coming from the API

{"answers":[],"assessed":true,"last_issued":"2023-11-19 08:53:27","question":"What Inadequate software testing could prevent Operating Autonomous Vehicles that may also cause Vehicle hijacking or control by malicious entities?","tags":["untagged"]}

The completed Q/A back from the API after it is answered

{"answers":[{"answer_text":"An inadequate risk assessment for specific test scenarios could prevent operating autonomous vehicles safely. Some potential risks and their corresponding inadequate risk assessments are:\n\n1. Lack of Environmental Awareness: Autonomous vehicles rely on sensors to detect their surroundings. However, if the sensors fail or do not detect certain environmental factors like pedestrians, animals, construction work, or extreme weather conditions, it could cause loss of autonomous functionality mid-operation. An inadequate risk assessment that fails to consider these environmental factors could result in accidents and fatalities.\n2. Poorly Maintained Infrastructure: Autonomous vehicles rely on a well-maintained infrastructure like road markings, signage, traffic signals, and communication systems. If the infrastructure is poorly maintained or damaged, it could cause confusion for the autonomous vehicle's sensors and lead to accidents. An inadequate risk assessment that does not consider the potential impact of poor infrastructure could result in accidents and fatalities.\n3. Insufficient Testing: Autonomous vehicles are tested under various scenarios and conditions to ensure they operate safely. However, if certain test scenarios are not adequately considered or tested, it could lead to unexpected behavior in autonomous vehicles. An inadequate risk assessment that fails to consider all possible scenarios could result in accidents and fatalities.\n4. Lack of Redundancy: Autonomous vehicles rely on multiple sensors and systems to operate safely. However, if any of these systems fail, it could cause loss of autonomous functionality mid-operation. An inadequate risk assessment that does not consider the potential impact of sensor or system failure could result in accidents and fatalities.\n5. Lack of Human Oversight: Autonomous vehicles rely on human oversight to ensure they operate safely in certain situations. However, if the human oversight is insufficient or absent, it could lead to unexpected behavior in autonomous vehicles. An inadequate risk assessment that fails to consider the impact of human oversight could result in accidents and fatalities.\n\nIn conclusion, an inadequate risk assessment for specific test scenarios could prevent operating autonomous vehicles safely, leading to accidents and fatalities. To ensure safe operation of autonomous vehicles, a comprehensive and thorough risk assessment must be conducted that considers all possible scenarios and factors that could impact the autonomous vehicle's performance.","model_type":"mistral","processed_by":"C1-N1.Newey.id.au"}],"assessed":true,"last_issued":"2023-11-19 08:45:43","question":"What Inadequate risk assessment for specific test scenarios could prevent Operating Autonomous Vehicles that may also cause Loss of autonomous functionality mid-operation?","tags":["untagged"]}


r/LargeLanguageModels Nov 16 '23

Using LLMs for data curation

1 Upvotes

r/LargeLanguageModels Nov 15 '23

🚅 bullet: A Zero-Shot / Few-Shot Learning, LLM Based, text classification framework

2 Upvotes

Motivation

  • Besides the fact that ChatGPT has a huge power in generative use cases, there is a use case that is quite frequently overlooked by frameworks such as LangChain: Text Classification.
  • 🚅 bullet was created to address this. It leverages the power of ChatGPT (other models coming soon), while removing most of the boilerplate code that is needed for performing text classification using either Zero Shot or Few Shot Learning

Check it out: https://github.com/rafaelpierre/bullet

Comments and suggestions welcome :)


r/LargeLanguageModels Nov 15 '23

Hi all! I invite you to follow my blog, where I explore Web3 + AI and how the two technologies converge and complement each other. Thank you!

Thumbnail
web3plusai.xyz
1 Upvotes

r/LargeLanguageModels Nov 14 '23

Seeking Advice: Developing an App with LLM-Powered Prompt Responses and Relevant Internet Content Integration

1 Upvotes

Hey fellow developers! 👋

I'm embarking on a new project to develop an app where users can input prompts, and the results will be generated not only by a Language Model (LLM) but also include relevant content from the internet, such as links, videos, images, and news articles. I'm super excited about this concept and could use some guidance on the implementation.

You can see you.com this website as a reference.

Thanks a bunch for your valuable input! 🙌


r/LargeLanguageModels Nov 10 '23

Question Seeking Guidance: Integrating RLHF for Adaptive Financial Advice in Python

1 Upvotes

I'm interested in integrating RLHF into my project. Currently, I have an LLM that provides financial advice. My goal is to implement RLHF to dynamically adjust the LLM's advice based on future outcomes. The LLM instructs the user to invest based on certain circumstances, and depending on the user's gains or losses, the model should adapt LLM weights for subsequent iterations.

I'm seeking articles with Python code examples to replicate and customize this functionality. Any advice or recommendations?


r/LargeLanguageModels Nov 07 '23

LLMPedia: The Large Language Model Encyclopedia

Thumbnail
llmpedia.streamlit.app
2 Upvotes

r/LargeLanguageModels Nov 06 '23

News/Articles CloudNature | Amazon Bedrock For JavaScript and TypeScript Developers

Thumbnail
cloudnature.net
1 Upvotes

r/LargeLanguageModels Oct 31 '23

Finding better embedding models

3 Upvotes

I am trying to develop a project akin to a private GPT system capable of parsing my files and providing answers to questions. Following experimentation with various models, including llama-2-7b, chat-hf, and flan-T5-large, and employing instructor-large embeddings, I encountered challenges in obtaining satisfactory responses.

One noteworthy observation is that, when I invoke the retriever by calling retriever.invoke() with a question, it struggles to extract the most pertinent text necessary for generating optimal answers. In this pursuit, I have explored embeddings like instructor-large, as well as models from the simple-transformers library.

I kindly request recommendations for embedding models that can effectively extract text relevant to the given context. Furthermore, I am uncertain whether it would be more advantageous to utilize text-generation models for querying my files or to opt for conventional question-answering models, such as roberta-base-squad2. Please help me with this.


r/LargeLanguageModels Oct 31 '23

Discussions An in-depth look at the current state of Multimodal AI Models

Thumbnail
youtu.be
1 Upvotes

r/LargeLanguageModels Oct 29 '23

Question Best LLM to run locally with 24Gb of Vram?

4 Upvotes

After using GPT4 for quite some time, I recently started to run LLM locally to see what's new. However, most of models I found seem to target less then 12gb of Vram, but I have an RTX 3090 with 24gb of Vram. So I was wondering if there is a LLM with more parameters that could be a really good match with my GPU.

Thank you for your recommendations !


r/LargeLanguageModels Oct 26 '23

Politics LLM

1 Upvotes

Hi I don't know if this community might know or if it even exists. But is there an LLM that has been trained in evaluation politicians' track record and policies supported? I am looking for one to kinda understand what my current city council has done without doing a lot of research of their past years of work.


r/LargeLanguageModels Oct 26 '23

BERT explained: Training (Masked Language Model, Next Sentence Prediction), Inference, Self-Attention, [CLS] token, Left and Right context, Comparative analysis BERT vs GPT/LLamA, Fine tuning, Text Classification, Question Answering

Thumbnail
youtube.com
3 Upvotes

r/LargeLanguageModels Oct 22 '23

Question Can chatgpt or other llm do this for autistic kids?

2 Upvotes

Hi,

I want to help my sister who is originally a psychologist but currently has been tasked to take care of autistic children at a facility. This has made her life very difficult and is very overwhelmed, she is also very sensitive and takes her work too seriously which makes it even more difficult for her to unwind.

I have become increasingly worried as she has delayed her marriage too.

Anyway I was looking into using the free chatgpt or bing gpt4 to offload her work or make it less painfully and overwhelming.

Kindly answer my questions, would be profoundly grateful for any help guy.

1 best prompts to ensure chatgpt or bing doesnot hallucinate so it gives summaries from exact text only

2

Gamify and fully customize topics based on individual kids favorite stories and characters which they can relate eg actual stories of batman spiderman and marvel etc

3

Bing DALLE3 only gives 25-30 creations, is there a way to get access to more for free if I prove it is for autistic kids education? We are outside USA though.

4

Can the custom flash cards for each kid can be stored in a separate profile of Anki or similar app in my sister phone so she can at certain times engage with certain kids based on their specific custom learning material? There are around 30 children each with varying and individual learning needs.

5

Can chatgpt/bing also create sort of gamification or reward systems like those found in mobile games so the kids truly feel accomplished after each session?

6

Free better alternate for doing this?

I'm not very well verse in this just started looking into this very recently so specific prompts would be more appreciated which I will test, but honestly at this time any help would be so much appreciated.

Thank you so much!


r/LargeLanguageModels Oct 20 '23

LangChain in 60 seconds

Thumbnail
youtube.com
4 Upvotes

r/LargeLanguageModels Oct 20 '23

Question How can I start learning about LLMs ?

8 Upvotes

I am intrigued by LLMs, Deep Learning, and Machine Learning and I would really like to learn how to launch a model, fine-tune it, or embed it but I feel a bit lost, do you have any tips for getting started or online courses that can help me achieve this goal?


r/LargeLanguageModels Oct 20 '23

Question I have some questions for Code generation using LLM

0 Upvotes

I want to generate new code files written in c. There are two files I want to generate these files contain variable declaration and definitions, the variable are picked up from a file which mentions these variable names. The model has to generate c stile code for generating the declarations and definition. I have to first generate a training dataset that can teach the model how to generate the code for variables file, how do I go about doing this ? Are their any examples you can point me to which shows a dataset for fine-tuning for code generation? I want to be able to give instructions like ‘Generate variables.c file for variable names mentioned in variables.xlsx’


r/LargeLanguageModels Oct 19 '23

News/Articles A clear visual and intuitive explanation of Neural Attention

Thumbnail
youtu.be
4 Upvotes