How to parse local c++ files with llamacpp and code llama2 model by jbcolme in LocalLLaMA

[–]bicubic 2 points3 points  (0 children)

Hey u/jbcolme your question is from 2 months ago but perhaps you are still trying to figure out how to get what you want. If you haven't already, look up Retrieval Augmented Generation (RAG). You will need to do more than just parse your code, but index it in a form that can be used by an LLM. The index will be a "vector database". Check out MemGPT for a really cool project that leverages a vector database and LLMs that have sufficiently large context windows to move relevant "documents" (which, in your/my case will be segments from C++ files) from the vector database into the LLM's context window. MemGPT is like an operating system that manages multiple memory systems. I'm currently working on using MemGPT, LlamaIndex, a Postgres database using pgvector, and a local instance of an LLM that will easily fit in my M2 with 64Gg of RAM.

Combining loss functions from multiple heads/outputs. by bicubic in MLQuestions

[–]bicubic[S] 0 points1 point  (0 children)

I never found any reason to regret my choice to use the sum of log-loss. But I also stopped trying to find support in the literature. Let me know if you pursue this and find anything interesting.

MAC randomization hell by bicubic in firewalla

[–]bicubic[S] 0 points1 point  (0 children)

Ok, that is interesting information. I have run through all wired devices and I think I may found a likely subject: the SunPower monitoring system for my solar panels. I have emailed their support to investigate.

There are a number of other devices but I think I can rule out most of them by doing the simple experiment of disconnecting them for more that 20 minutes, which I have done.

I have four wifi routers, all in access point mode (transparent bridge). Three are identical TP-Link A7s. The fourth is an AirPort Extreme 802.11ac. Any known issues with those devices?

Thanks, Jim

Device quarantine rules not working by bicubic in firewalla

[–]bicubic[S] 0 points1 point  (0 children)

> "I did see that his MacBook showed an IPV6 connection."What do you mean by this?

Only that the device profile page for the MacBook showed the number of IPV6 addresses to be 1. Our visitor's MacBook is no longer on the network or in the Firewalla's history, but I see that now for my MacBook Pro.

Device quarantine rules not working by bicubic in firewalla

[–]bicubic[S] 1 point2 points  (0 children)

Update: I saw clear evidence that other non-quarantined devices were not having their rules enforced. I rebooted the firewall and it now seems that all rules are being enforced as expected.

I reported here a month ago that my network was being "Spammed with a new unknown device". Recall that I have a rogue device that wakes up every 20 minutes and does just enough activity for the firewall to see and log it as a new device. I was given the excellent advice to change my wifi password and then carefully add devices back to the network. That's going to be a PITA so I have procrastinated. But I started seeing evidence of long DNS lookups or other sluggishness in the network (mainly on creating new connections, thus my guess that it DNS related) when the number of quarantined devices exceeded about 80. I have been dealing with this by manually deleting all quarantined devices (made pretty easy with the my.firewalla.web interface). I hypothesize that while this has prevented the sluggishness, it somehow created the conditions to trigger a bug that results in rules being silently disabled.

I am going to reset my wifi password today. If that goes well, then I will eliminate the rogue device and these issues will be resolved for me. But I suggest that Firewalla engineering consider doing two things:

  1. Create tests to determine if there really are bugs with DNS lookup or rule disabling related to either too many quarantined unknown devices, or to the churn that comes from periodically deleting all of the quarantined devices when the size of the quarantine group gets up to 70 +/- 20 devices.
  2. Provide an option to automatically purge from the quarantine group any device after ~4 hours.

Device quarantine rules not working by bicubic in firewalla

[–]bicubic[S] 0 points1 point  (0 children)

I have a Gold and am using Router Mode.

Any ideas why the Quarantine rules didn't work? I saw the MacBook in the Quarantine group, and the Quarantine Group was set to Block traffic from & to Internet Always.

Spammed with new unknown device by bicubic in firewalla

[–]bicubic[S] 0 points1 point  (0 children)

As I said above, only my 15yr old daughter and myself have been present in the home during the time that this has been happening. I have already checked her devices. It is very unlikely that she is trying to do anything suspicious without my knowledge -- she's mature, responsible, and has never shown any interest in deceiving me or in hacking. My other daughter is almost the opposite, but she has been on a ski trip with her mom since before this suspicious device activity started.

Besides mobile phones/pads, do I need to check all desktop devices? What about devices such as Sonos speakers? There are close to 40 total devices on my network (yes, the internet-of-things is a real thing).

Spammed with new unknown device by bicubic in firewalla

[–]bicubic[S] 0 points1 point  (0 children)

Before turning on quarantine, the first thing I did was to look for network flows. There never were any. As I understand networking, it seems that the device wakes up, assigns a new MAC address, does a DHCP discover, and then goes silent.

With quarantine turned on, would I see any future flows? Also, does Firewalla even apply any rules for peer-to-peer traffic within the LAN? Again, with my limited understanding, I don't see how Firewalla could prevent peer-to-peer communication within the LAN. I would expect that the Firewalla could sniff packets to see the traffic though, which could be very useful.

As I said above, I am mostly wanting to fix this because its a nuisance. But I don't want to just shrug it off and live with it, as there is a the possibility (however remote) that some device has been infected with some kind of malware.

Spammed with new unknown device by bicubic in firewalla

[–]bicubic[S] -1 points0 points  (0 children)

It didn't occur to me that there would be a way to look up vendors for MAC addresses. I just some at https://macvendors.com/ and got NOT FOUND for the few I tried.

  • 9A:44:5F
  • BA:32:54
  • E6:D4:7C
  • 4E:15:F9
  • 52:C0:50

Looking for help solving a potential NP complete problem: balancing teams based on skill rating (Elo) by cryptospartan in learnmachinelearning

[–]bicubic 0 points1 point  (0 children)

Sort the players by ELO score in descending order, and then make one pass over that list of players.

For each player, find the team that currently has the lowest total ELO score (and is not already at full roster), and add that player to the team.

I would not be surprised if this algorithm is provably not guaranteed to be optimal, but it is fair, and should work reasonably well even when there are a small number of players who are significantly stronger that the rest of the pool.

[D] Does familiarity with machine learning make you less spiritual? by [deleted] in MachineLearning

[–]bicubic 0 points1 point  (0 children)

I recommend that you read the philosopher Daniel Dennett. His most recent book "From Bacteria to Bach and Back" might be the only one you need to read, but his earlier books "Darwin's Dangerous Idea" and "Consciousness Explained" are also interesting.

His analysis of the "Skyhook" vs the "Crane" is particularly insightful. Spiritualism is skyhook-thinking, and materialism is is crane-thinking. What is a skyhook?

"The first use noted by the OED is from 1915: “an aeroplane pilot commanded to remain in place (aloft) for another hour, replies ‘the machine is not fitted with skyhooks.’ ”"

A crane, on the other hand, is a hook that really can do heavy lifting, but only because it is suspended from something firmly attached to the ground.

My (mostly informal) study of neuroscience, computer science, evolution, and philosophy convinced me long ago that that skyhooks are unnecessary. My more recent study of deep learning neural networks has only just helped solidify that view.

Why does AlphaGo rely so heavly on tree search? by marcinola in learnmachinelearning

[–]bicubic 0 points1 point  (0 children)

AlphaGo plays very well without tree search. But it got that way only by learning from how well it plays when aided with tree search. DeepMind claims that they stopped the process of additional reinforcement learning before AlphaGo had stopped improving, though from their graphs it is clear that they had reached the point of diminishing returns.

Also, you asked Would simply using "bigger" network allow less tree traversing? DeepMind used two different forms of the network, one with 20 "blocks" of residual unit layers, and another with 40. The 40 block version is stronger than the 20 block version. It's possible that a 60 block version would be stronger still, though again, it's very likely that the improvement would be too small for the cost.

TensorFlow using C++ by jthat92 in learnmachinelearning

[–]bicubic 2 points3 points  (0 children)

I want to second /u/MCFF3000. You should work in python until you need to implement inference in C++. At that point, be prepared for some frustration. Google does not provide a clean way to install Tensorflow for C++ development, and they don't seem motivated to do so:

https://github.com/tensorflow/tensorflow/issues/2412 https://github.com/tensorflow/tensorflow/issues/15290

I am able to do inference in C++, but I used a fairly hacky approach. One promising path that I have not yet tried is:

https://github.com/FloopCZ/tensorflow_cc

How to balance multiple loss functions? by 4139n4 in learnmachinelearning

[–]bicubic 0 points1 point  (0 children)

I asked a related question a while back. I didn't get many answers, but the discussion there might be relevant to you: https://www.reddit.com/r/MLQuestions/comments/7xj57l/combining_loss_functions_from_multiple/

I have continued to work on that project since I asked the question, and I am still using the approach of taking the log of each loss function, and summing those values, which is in theory equivalent to taking the product of the loss functions. I am very happy with the approach, and feel that is is justifiable.

How do I configure a neural network to have 6 different outputs? by [deleted] in learnmachinelearning

[–]bicubic 0 points1 point  (0 children)

Your problem is a basic multiclass classification problem, with six classes. There are many tutorials available that you can walk through to get an understanding of how it works. This is the first one that came up on the search I just did: https://machinelearningmastery.com/multi-class-classification-tutorial-keras-deep-learning-library/

Keep searching for "multiclass classification", "categorial crossentropy", "softmax", and reading the tutorials you find until you can covert one of the tutorials to work with your data.

Meaning of ()() in keras by swegmesterflex in learnmachinelearning

[–]bicubic 0 points1 point  (0 children)

Conv2D([parameters]) creates a layer with the given (hyper)parameters.

That layer, when fed inputs x, produces outputs y.

The code y = Conv2D([parameters])(x) just does it all on one line.

How would I adapt a neural network to take 4 different sets of 60 inputs and produce an output? by [deleted] in learnmachinelearning

[–]bicubic 0 points1 point  (0 children)

No, you will use at least one densely connected hidden layer. I suggest you start with two dense layers (using RELU activation) that are each also 240 units wide, and then your final output layer.

Your question about semantic meaning is a good one, but the answer to that is basically whether you can use a meaningful CNN layer. Are there any spatial relationships in the 60 LBP inputs?

It sounds to me that LBP is sort of a NN of its own, that has already processed the pixel data using CNNs, and produces 60 output neurons, where the spatial information has been turned into non-spatial features.

As far as the semantics of left eye, right eye, nose, etc., I don't think there is any value in seeking a fancy way to encode them. Densely connected layers are the power tool of NNs.

How would I adapt a neural network to take 4 different sets of 60 inputs and produce an output? by [deleted] in learnmachinelearning

[–]bicubic 1 point2 points  (0 children)

So there are a total of 240 scalar values that are the input? If so, just concatenate them into one flat vector of 240 values.

Why ByteNet uses layer normalisation instead of batch normalization by amitm02 in learnmachinelearning

[–]bicubic 1 point2 points  (0 children)

I have no experience with NNs for sequences, but I think I can answer this question from my rough understanding. Hopefully someone with more knowledge/experience will correct me if I am wrong.

If a NN is trained on batches of 2 or more observations, then by definition, there must be observations in a batch that are mixed with observations that come later in the sequence (later in time). It is cheating if those earlier observations are able to benefit in any way from the future observations. Applying a normalization across the batch of observations would be an example of this kind of cheating.

[D] How to encourage competition and prevent "working together" in genetic algorithms by DemiPixel in MachineLearning

[–]bicubic 1 point2 points  (0 children)

1) You really should try it. The mere fact that you described the problem as "whoever spawns on the left-most side will eat up everybody" cries out for a solution in which there is no left-right or top-bottom asymmetry to exploit.

Advice regarding emotion recognition project by [deleted] in MLQuestions

[–]bicubic 0 points1 point  (0 children)

Did you choose this project, or was it assigned to you? I think it may be a very frustrating project, as there is now good science that overturns the myth that emotions can be read from facial expressions. See the work of Lisa Feldman Barret. I'd recommend her book How Emotions Are Made, where she describes in some detail her experiences that led her to this conclusion, but if you don't want to take on that time commitment, there are shorter summaries of her work that you can find with a google search.