CODE-LLAMA For Talking to Code Base and Documentation

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ม.ค. 2025

ความคิดเห็น • 75

  • @rehberim360
    @rehberim360 ปีที่แล้ว +7

    It's one of the rare channels where I've been happy to see a new video notification for a long time. I'm waiting for the next time to come. I feel so lucky that you post videos very often and tell us the latest information perfectly. We don't want to lose you, keep it up bro

  • @kevinyuan2735
    @kevinyuan2735 ปีที่แล้ว +5

    谢谢!

  • @andrzejpec4886
    @andrzejpec4886 ปีที่แล้ว +3

    First second I hear Indian accent = Imma'bout to get pure useful information from this video, this is for sure.
    Thx for the video though 1 thing - when you talk about "previous video" at the beginning of the video, I'd consider to provide this "leading link" that shows in the corner because I'm not familiar and have to dig into your feed to find it. Not a great issue but still - just a tip to consider.

  • @vswraith
    @vswraith ปีที่แล้ว +4

    Can you share the notebook link?

  • @ayusharora390
    @ayusharora390 หลายเดือนก่อน

    Is there a way to load multiple repos for the solution you showed. I have like 10 repos and i need my model to answer based on all the different code bases.

  • @japorto100
    @japorto100 ปีที่แล้ว +3

    Hi Prompt Engineer. Amazing stuff as always. I just have a question about embedding in the Chroma DB in general. Where can i find the different Embedding models and how can i speed the embedding process up. Because for lets say 100 documents i think the app would crash. Doesnt seems scalable. Or am i getting something wrong here?

    • @kamadelva1235
      @kamadelva1235 10 หลายเดือนก่อน

      you can use something like this :
      embeddings = SentenceTransformerEmbeddings( model_name= "sentence-transformers/all-MiniLM-l6-v2", model_kwargs= {'device':'cuda'}, encode_kwargs= {'normalize_embeddings': False})
      Chroma.from_documents( chunks, embeddings)

  • @RobertoFabrizi
    @RobertoFabrizi ปีที่แล้ว

    How do I ask questions that hit the same file, for example if I want to know how many different constructors a certain class has? I tried everthing and it always came back to me with an inferior number to the actual ones

  • @CesarVegaL
    @CesarVegaL ปีที่แล้ว +2

    Thank you for your videos. I would appreciate if you publish the notebook

  • @adnanrizve5551
    @adnanrizve5551 ปีที่แล้ว +1

    How we can restrict the answers to the given context? No matter one what codebase I am creating embedding, the model LLM is given responses based on it pretrained data

    • @engineerprompt
      @engineerprompt  ปีที่แล้ว

      You will need to provide a system prompt. Check out my latest video on localgpt. There is an example prompt

  • @finnsteur5639
    @finnsteur5639 ปีที่แล้ว +1

    Nice video!
    I had a question. What would be the best and fastest small model to use on an old cpu? Like 6th generation i5 for example.
    I heard of orcamini3b and falcon1b what do you think?

  • @RuchikaDas-x6k
    @RuchikaDas-x6k ปีที่แล้ว +1

    Hi,thanks for the tutorial but I am facing a RateLimitError while executing this particular line of code :"db = Chroma.from_documents(texts, OpenAIEmbeddings(disallowed_special=()))" for both Code-LLAMA and GPT-4 LLM .How can I solve this error?

    • @kamadelva1235
      @kamadelva1235 10 หลายเดือนก่อน

      use a different embeddings, like embeddings = SentenceTransformerEmbeddings( model_name= "sentence-transformers/all-MiniLM-l6-v2", model_kwargs= {'device':'cuda'}, encode_kwargs= {'normalize_embeddings': False})

  • @danaelifaz4835
    @danaelifaz4835 8 หลายเดือนก่อน

    Thank you for the video. I get 0 documents loaded when integrating the code to my Python script. does this work on Windows?

  • @bakistas20
    @bakistas20 ปีที่แล้ว

    What's the difference between those two prompts you defined: sys prompt way and the simple one?

  • @NaveenKumar-hb4qz
    @NaveenKumar-hb4qz 2 หลายเดือนก่อน

    thank you for this video, could you please share the notebook or git link of this

  • @mehulparmar9976
    @mehulparmar9976 10 หลายเดือนก่อน

    How to generate code documentation from codellama? The input will be a class or method in java.

  • @andy111007
    @andy111007 ปีที่แล้ว

    Thanks for the Amazing tutorial, Not able to get BLAS=1, created a ticket for the same. Looking forward to hearing from you

  • @sunilanthony17
    @sunilanthony17 ปีที่แล้ว

    Please do a video to setup GPU on a windows machine. I've been trying for days to use my GPU and can't get it to work. I've installed CMAKE, CUDA developer tools and etc. Nothing works. I have two GPUs on my laptop.

  • @malleswararaomaguluri6344
    @malleswararaomaguluri6344 ปีที่แล้ว

    can we run llama2 model in windows machine with gpu with own documents. let me suggest which video will give information about this. mostly i am getting error while downloading data from meta llm using hugging face api.

  • @CognitiveComputations
    @CognitiveComputations ปีที่แล้ว +1

    This is really great!

  • @shalabhgarg8225
    @shalabhgarg8225 10 หลายเดือนก่อน

    all examples are on python code base, trying to make it work for Csharp code base but it doesnt work

  • @haroonmansi
    @haroonmansi ปีที่แล้ว

    thanks! if we do not want to use OpenAI embedding, what open source one you recommend for python code in this case? FAISS will be fine?

    • @engineerprompt
      @engineerprompt  ปีที่แล้ว

      For embeddings, I like to use the instructors embeddings. FAISS will be fine as well.

    • @haroonmansi
      @haroonmansi ปีที่แล้ว

      Thanks! @@engineerprompt

  • @THEVIERAOS
    @THEVIERAOS ปีที่แล้ว

    Are the models from hugging face the same as those released by Meta?

  • @akshathreddy158
    @akshathreddy158 8 หลายเดือนก่อน

    It is for python code base. I tried for Java code base but it doesn't work. Can you suggest on this

  • @MrBorkori
    @MrBorkori ปีที่แล้ว

    When I'm trying with your template that you describe in the video. I'm getting strange answer
    when I print the output from:
    # Docs
    question = "{Current Question}"
    docs = retriever.get_relevant_documents(question)
    print(docs)
    [Document(page_content='ans = qa.run(\'Based on the stg_jaffle_shop.yml file generate sample csv data for each table with minimum 100 rows. The sample data should be with foreign key constraint.\')

    # \'Write a test case for the database connection using unittest.\'

    #\'Write a test case for the code in connection.py using unittest.\'

    #\'Based on the .yml files generate sample csv data for jaffle_shop_customers table with 100 rows\'
    I see that they are in comments ... but the answer from model is the following.....
    "This request is not clear to me. Please provide more details so we can help you better. Do you want us to generate sample CSV files or do you want to create a test case using unittest? "
    it looks like the LLM model doesn't recognize the right question.

  • @7stuti
    @7stuti 9 หลายเดือนก่อน

    Can I use codellama-7b-hf model with langchain

  • @TheCopernicus1
    @TheCopernicus1 ปีที่แล้ว +1

    Amazing mate!

  • @CognitiveComputations
    @CognitiveComputations ปีที่แล้ว

    Can you please give an example that loads 34b instead of 13b? For some reason, I can't get it to work with 34b,

    • @engineerprompt
      @engineerprompt  ปีที่แล้ว +1

      I will have a look at it today, are you trying gguf format?

  • @alefdoreu
    @alefdoreu ปีที่แล้ว

    Can I use GGUF model my gpu doesnt have enough VRAM

  • @Shahidma58
    @Shahidma58 ปีที่แล้ว

    Here also openAPI key is required. Is there anyway to access hugging face models without API key or with some free Key?

    • @engineerprompt
      @engineerprompt  ปีที่แล้ว +2

      Yes, should have highlighted more, the openai api key is required for the embedding model, you can replace his by any other open source embedding model and this should work

    • @Shahidma58
      @Shahidma58 ปีที่แล้ว

      Hi, thanks for your response, I have just started learning the long-chain and for the time being, I am not able to purchase chatPGPT for API key but I want to develop some apps using hugging face models to develop the apps, like 'Ask the doc' to read PDF and answer the questions. I will buy chatGPT if my app goes through the testing. Best Regards,

  • @yusufkemaldemir9393
    @yusufkemaldemir9393 ปีที่แล้ว

    i did not see the notebook attachment. will you provide it? is this applicable to link to ui?

    • @engineerprompt
      @engineerprompt  ปีที่แล้ว

      The link to documentation is in the description where the code is, should work with UI as well

  • @korchi
    @korchi ปีที่แล้ว

    Is it possible to use your localGPT project with Code-LLAMA (and ingest code to ChromaDB)?

    • @engineerprompt
      @engineerprompt  ปีที่แล้ว +1

      Yes but you will need to change the document loader part in the code. Will also need to make changes to the splitter part, the rest will work just fine.

  • @Finwe2
    @Finwe2 ปีที่แล้ว

    Do we have to use LlamaCpp for RAG?

    • @engineerprompt
      @engineerprompt  ปีที่แล้ว

      Not really, it’s just for using the ggml/gguf models

    • @Finwe2
      @Finwe2 ปีที่แล้ว

      @@engineerprompt Hm yeah I couldn't get RAG to work properly with my org's source code. Even tried to use it with LlamaCpp and the llm = pipeline() -> llm("my prompt") method

  • @echofloripa
    @echofloripa ปีที่แล้ว

    Is it possible to run this on Google colab?

    • @engineerprompt
      @engineerprompt  ปีที่แล้ว

      Yes, you probably want to use the 7B model

  • @dave47663
    @dave47663 4 หลายเดือนก่อน

    How is that interacting with the codebase? That's just generic how to init a react app that any gpt can do without knowing anything about the codebase.

  • @mohammedsuhail1500
    @mohammedsuhail1500 10 หลายเดือนก่อน

    Thanks brother

  • @janalgos
    @janalgos ปีที่แล้ว

    Could you do a video about Cursor? So far to me seems very useful and better than copilot

    • @parasetamol6261
      @parasetamol6261 ปีที่แล้ว +1

      what is differrence form this and copilot

    • @janalgos
      @janalgos ปีที่แล้ว

      @@parasetamol6261 easier and more integrated compared to tabnine/copilot

  • @CrispinCourtenay
    @CrispinCourtenay ปีที่แล้ว

    Can you list system specs, rather than just stating that you used a GPU?

  • @jerryyuan3958
    @jerryyuan3958 ปีที่แล้ว

    Can u share the codelab code ?

    • @engineerprompt
      @engineerprompt  ปีที่แล้ว

      Yes? Will put together it in a colab and share

    • @FranciscoMonteiro25
      @FranciscoMonteiro25 ปีที่แล้ว

      @@engineerprompt where can i find your github repo Sir?

  • @MrBorkori
    @MrBorkori ปีที่แล้ว

    Again very useful video, Thank you very much!!
    I'm new in this area and it's not clear .... I have a concern about embedding function/model - if you use OpenAIEmbeddings should I worry about some privacy concerns in cases involving sensitive data.
    I have already tried with open source model embedding like HuggingFaceInstructEmbeddings
    model_name = "hkunlp/instructor-large"
    but when I try to load it into Chroma gives me the following error message: chromadb.errors.InvalidDimensionException: Embedding dimension 384 does not match collection dimensionality 1536

    • @engineerprompt
      @engineerprompt  ปีที่แล้ว +1

      Yes, you are sharing your data with openai.
      I regards to that error, simply delete your vector store and then rerun the embedding computation, this should work. Basically you have existing vector store where embeddings have different dimensions. You want to recompute everything from scratch

    • @MrBorkori
      @MrBorkori ปีที่แล้ว

      It works - Thank you a lot again!! You save me from headache!!@@engineerprompt

  • @3lbios
    @3lbios ปีที่แล้ว +2

    Nice vid, but you can't just use any generic embeddings model, you'd need something that works well for code and that's tough. OpenAI is probably one of the best still. Also anyone who uses GPT4 for code and tries 13B CodeLlama, or 34B even, is going to be sad. It's as bad as GPT3.5, mostly worse. Kind of useless for any higher level reasoning. Also if you're using it for Python why not use the Python-specific CodeLlama model that was optimized exactly for Python use?

  • @alx8439
    @alx8439 ปีที่แล้ว

    Why are you saying "GPU" in relation to M2? It's arm CPU and llama.cpp project just uses very bespoke optimizations for that CPU, but not the GPU

    • @erikjohnson9112
      @erikjohnson9112 ปีที่แล้ว

      M2 has integrated GPU.

    • @alx8439
      @alx8439 ปีที่แล้ว

      @@erikjohnson9112 and the whole thing is having power supply and LCD screen. But what does it have to do with inference?

    • @LIMLIMLIM111
      @LIMLIMLIM111 2 หลายเดือนก่อน

      Looks like if using M series, there is no cuda, so you can't really use gpu. I am not really sure what the author is using, but I don't think Mac can use GPU here.

  • @cudaking777
    @cudaking777 ปีที่แล้ว

    My comments get deleted not sure what is happing

  • @VOKorporation
    @VOKorporation ปีที่แล้ว

    Add collaboration file please

  • @pabloartero1155
    @pabloartero1155 11 หลายเดือนก่อน

    I actually wanted to talk to my code to ask why it's so bad.

  • @RickySupriyadi
    @RickySupriyadi ปีที่แล้ว

    hello

  • @csowm5je
    @csowm5je ปีที่แล้ว

    docs = retriever.get_relevant_documents(question), not sure what is this "retriever". getting NameError: name 'retriever' is not defined

    • @csowm5je
      @csowm5je ปีที่แล้ว

      had to include previous video code to make it work. Thanks

  • @DurgeshParekh
    @DurgeshParekh ปีที่แล้ว

    This is very insightful tutorial I have applied this but I have doubt how you have created retriever object for Llama?
    retriever.get_relevant_documents(questions)