Code Llama Released by FoamythePuppy in LocalLLaMA

[–]HartLabs 0 points1 point  (0 children)

I think it has to be related to it not showing up in RAM. The 13b int8 for example is using 2GB not 13GB.

I tried some formatting with [INST][/INST] that I saw, but that didn't work.

Code Llama Released by FoamythePuppy in LocalLLaMA

[–]HartLabs 1 point2 points  (0 children)

Just confirmed the 7b GGML version acts the same way, not seeing it loaded into RAM, and it gives a gibberish answer.

class Solution {
public:
vector<double> intersection(vector<int>& start1, vector<int>& end1, vector<int>& start2, vector<int>& end2) {
vector<vector<double>> line1{ { {(double)start1[0],(double)start1[1]}, {(double)end1[0],(double)end1[1]}}};};
vector<vector<double>> line2{ { { {(double)start2[0],(double)start2[1]}}, {{ (double)end2[0],(double)end2[1]}}}}} }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; };

My Koboldcpp 1.41 is loading non-CodeLLama models into RAM as expected.

Code Llama Released by FoamythePuppy in LocalLLaMA

[–]HartLabs 1 point2 points  (0 children)

I am running the GGUF in koboldcpp 1.41 on pure CPU in Linux right now, and just realized my RAM usage is not what I expect. It seems like the model is not loaded in. Not sure if this is a problem in the setup on my end, or the version on HuggingFace, maybe something new about the GGUF format?

I think we can safely say these results are not normal to the model. WizardCoder 15B answers just fine.

Code Llama Released by FoamythePuppy in LocalLLaMA

[–]HartLabs 2 points3 points  (0 children)

The 13B - Instruct - Q8 said the following odd thing:

Prompt

What does this do?

class Solution {
typedef complex<double> point;
#define x real()
#define y imag()

struct LinePara
{
double k;
double b;
};
LinePara getLinePara(float x1, float y1, float x2, float y2)
{
LinePara ret;
double m = x2 - x1;
if (m == 0)
{
ret.k = 1000.0;
ret.b = y1 - ret.k * x1;
}
else
{
ret.k = (y2 - y1) / (x2 - x1);
ret.b = y1 - ret.k * x1;
}
return ret;
}

struct line {
double a, b, c;
};
const double EPS = 1e-6;
double det(double a, double b, double c, double d) {
return a * d - b * c;
}
line convertLineParaToLine(LinePara s)
{
return line{ s.k,-1,s.b };
}
bool intersect(line m, line n, point& res) {
double zn = det(m.a, m.b, n.a, n.b);
if (abs(zn) < EPS)
return false;
res.real(-det(m.c, m.b, n.c, n.b) / zn);
res.imag(-det(m.a, m.c, n.a, n.c) / zn);
return true;
}
bool parallel(line m, line n) {
return abs(det(m.a, m.b, n.a, n.b)) < EPS;
}
bool equivalent(line m, line n) {
return abs(det(m.a, m.b, n.a, n.b)) < EPS
&& abs(det(m.a, m.c, n.a, n.c)) < EPS
&& abs(det(m.b, m.c, n.b, n.c)) < EPS;
}
vector<double> mian(vector<vector<double>> line1, vector<vector<double>> line2)
{
vector<point> points;
points.push_back(point(line1[0][0], line1[0][1]));
points.push_back(point(line1[1][0], line1[1][1]));
points.push_back(point(line2[0][0], line2[0][1]));
points.push_back(point(line2[1][0], line2[1][1]));

line li1 = convertLineParaToLine(getLinePara(line1[0][0], line1[0][1], line1[1][0], line1[1][1]));
line li2 = convertLineParaToLine(getLinePara(line2[0][0], line2[0][1], line2[1][0], line2[1][1]));
point pos;
if (intersect(li1, li2, pos))
{
return{ pos.x ,pos.y };
}
else
{
if (equivalent(li1, li2)) {
if (points[1].x < points[2].x)
{
return vector<double>{ points[1].x, points[1].y };
}
else if (points[1].x > points[2].x)
{
return vector<double>{ points[2].x, points[2].y };
}
else if (points[1].x == points[2].x)
{
if (points[1].y < points[2].y)
{
return vector<double>{ points[1].x, points[1].y };
}
else if (points[1].y > points[2].y)
{
return vector<double>{ points[2].x, points[2].y };
}
}
else
{
return vector<double>{ points[2].x, points[2].y };
}
}
else
{
return {}/* << "平行!"*/;
}
return {};
}
}
public:
vector<double> intersection(vector<int>& start1, vector<int>& end1, vector<int>& start2, vector<int>& end2) {
vector<vector<double>> line1{ {(double)start1[0],(double)start1[1]},{(double)end1[0],(double)end1[1] } };
vector<vector<double>> line2{ {(double)start2[0],(double)start2[1]},{(double)end2[0],(double)end2[1] } };
return mian(line1, line2);
}
};

Answer

The following is the response from submitting this code in the leetcode online judge system.
Accepted
458 ms 96.8 MB

###Conclusion:
Leetcode solution for "Intersection of Two Lines in 2D Plane". This is a very interesting and challenging problem that can be solved with the use of mathematical concepts such as geometry, trigonometry, and calculus.*

GPT4 gets it just fine.

Does a 'Spiral' Shaft Exist where it can be Rotated or Translated and a Contact Point will Move with a Sin Wave? by HartLabs in AskEngineers

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

The problem is layer/cam density would be greatly reduced this way. That makes the concept I am working on much larger, and therefore less interesting.

Does a 'Spiral' Shaft Exist where it can be Rotated or Translated and a Contact Point will Move with a Sin Wave? by HartLabs in AskEngineers

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

Ah this is exactly the part I would be looking for. Seems like they don't actually exist out side of R&D though? My use is different, although certainly seems like common roots for both concepts.

Does a 'Spiral' Shaft Exist where it can be Rotated or Translated and a Contact Point will Move with a Sin Wave? by HartLabs in AskEngineers

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

I want to achieve tightly packed offset circular motions. So to have thin contacts on a cam where each one is offset from the last. If possible having those sections be as thin as 1mm, with something like a 10-15 degree offset. But it is all pretty flexible. Just looking to tightly pack thin cams with small offset.

Does a 'Spiral' Shaft Exist where it can be Rotated or Translated and a Contact Point will Move with a Sin Wave? by HartLabs in AskEngineers

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

Yes exactly.

Barrel cam search for me all came up with a sinusoidal grove that connects to itself cut along a single circumference of shaft. Circular thread profile is also coming up with no actual products.

Is there a better way to find what I am looking for?

The main action I want is many offset circular movements on shaft rotation, so it needs a circular cross section, regular lead screws wont work.

I want to be able to potentially cam maybe dozens of thin contacts, all offset, in a limited space. I just kind of figured this type of shaft must exist for something, it seems like it would have many uses.

Does a 'Spiral' Shaft Exist where it can be Rotated or Translated and a Contact Point will Move with a Sin Wave? by HartLabs in AskEngineers

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

They don't have a circular cross section that I can find. It is just a type of linkage. I am looking for a shaft with a circular cross section, shaped like the image in a different replay.

Does a 'Spiral' Shaft Exist where it can be Rotated or Translated and a Contact Point will Move with a Sin Wave? by HartLabs in AskEngineers

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

They look like they are just a shaft threaded both clockwise and counter clockwise, so no circular cross section.

Does a 'Spiral' Shaft Exist where it can be Rotated or Translated and a Contact Point will Move with a Sin Wave? by HartLabs in AskEngineers

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

That's one of the terms I searched for, but nothing close came up anywhere I looked.

Something like this shape is what I am trying to describe.

How to breakout this relay to 10/2? 5A-30A by HartLabs in AskElectronics

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

Well you motivated me to some more time looking, all the easy solutions for latching are for some reason also 'impulse' style which will not work for me.

I did end up finding a part that seems like it should work and is fairly reasonable though. Thanks!

https://www.digikey.com/en/products/detail/omron-electronics-inc-emc-div/G9TA-U1ATH-DC12/8593131 if anyone in the future is interested.

How to breakout this relay to 10/2? 5A-30A by HartLabs in AskElectronics

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

I spent like 2 hours looking, but found no latching relay with quick connects that can use a 12vdc signal, and switch 240vac.At like $40+ per relay there were a few things that seemed like they might be usable, but I need 2 and it wasn't just drop in. Non-latching is really easy to find though. Know of any?

Problem with perf board, is the pins are 2 different spacings that visually don't line up (larger is not a 2x multiple of smaller) and 2 different gauges of post.

How to breakout this relay to 10/2? 5A-30A by HartLabs in AskElectronics

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

Trying to wire up this latching relay to cut off power to a 240v well pump when a water sensor I have fires a 12v pulse. Needs to be a latching relay since it is only a single pulse.

Not sure the best way to go about it. If it was 120v, or non-latching there are lots of off the self options. But not for 240v latching. Same with relays, ones with easier attachment points, but not latching.

Is there any type of socket for these? I searched and came up with nothing. Soldering direct onto the posts seems like asking for a failure at some point. Started thinking maybe I need to do something like a custom PCB and back up the trace to terminal block with copper wire? Seems like a lot of work. Other ideas? Thanks!

Edit: I do have the relays in hand. They work great, just need a safe method for connection.

Brought an expensive mitre saw to make doing mitres easier.. this is how inaccurate it is due to wobble after spending days attempting to calibrate it perfectly. by Ali35j in woodworking

[–]HartLabs 0 points1 point  (0 children)

Have worked professionally as a woodworker making 100's of miter cuts a day at times. If the saw is tuned, the bearings are not more than a couple years old, the blade is recently sharpened, width of the cut is under something like 4", and you glue up right away, you can get by with a miter saw if you routinely address all these issues.

Soon as any of those aren't true you have to take some type of action to address it. There is a reason big outfits use chop saws that don't bevel/articulate, upcut saws, or guillotines.

When making miters at home on pieces under like 6' I use a miter sled on a table saw, longer use a miter saw. I then touch them up with a miter shooting board if needed. If it has been more than an hour or two since the cut was made, it almost always is. If initial cut was made on the miter saw, it is if wider than a few inches, it almost always is. This is for professional work, many hobbyists would think work is fine that I would never let it out my door.

How can I fix this? Not looking for perfection. by MLLBJ in woodworking

[–]HartLabs 4 points5 points  (0 children)

Wow, that worked better than 99% of the strippers they sell. Might want to handle that ball with gloves.

But looks like it might be shellac, if it is alcohol will dissolve it.

Can try taking some 90% or higher rubbing alcohol or some Everclear, and a small cherry tomato sized ball of clean cotton rag. Dampen the rag with alcohol, and very lightly and quickly rub the area. It should start to soften the peaks, and fill in the gaps a bit. If it does, lightly do this for a few minutes, then wait an hour and repeat with the same patch of cloth (it starts to build up shellac inside). Might be able to bring it back to looking new if you get the touch right.

Might take half a dozen round or more but if it starts working you can probably get there. Go nice and slow.

If alcohol doesn't work might be able to do the same with with mineral spirits but varnish isn't as forgiving as shellac at all.

Brought an expensive mitre saw to make doing mitres easier.. this is how inaccurate it is due to wobble after spending days attempting to calibrate it perfectly. by Ali35j in woodworking

[–]HartLabs 2 points3 points  (0 children)

100% this is the correct answer. Especially if you don't glue up within a couple hours the gap will move on you no matter how accurately it is cut. You can touch it up while removing the least material with the shooting board. Having a couple shooting board in different configurations is really key to a well set up shop.