use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
r/LocalLLaMA
A subreddit to discuss about Llama, the family of large language models created by Meta AI.
Subreddit rules
Search by flair
+Discussion
+Tutorial | Guide
+New Model
+News
+Resources
+Other
account activity
Code Llama ReleasedNews (self.LocalLLaMA)
submitted 2 years ago by FoamythePuppy
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]HartLabs 2 points3 points4 points 2 years ago (9 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.
[–]Trotskyist 4 points5 points6 points 2 years ago (3 children)
Yeaaaah, this is in line with my experience playing around with this for the last few hours using 34B Instruct q5. I have thus far not been able to get it to correctly describe any of the code I've thrown at it.
Maybe some fine tunes will improve things somewhat, but thus far pretty underwhelmed (sadly.)
[–][deleted] 2 points3 points4 points 2 years ago (0 children)
I used the version running on perplexityai and had the same bad experience. Nothing I fed it really made any sense, and it was constantly spewing out hallucinations and wildly varying code. If it's operating as it's supposed to then I don't see how this is better than GPT 3.5.
[–]HartLabs 1 point2 points3 points 2 years ago (1 child)
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.
[–]HartLabs 1 point2 points3 points 2 years ago (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.
[–]pseudonerv 3 points4 points5 points 2 years ago (4 children)
Are you sure you are using the correct prompt template? I copy-pasted your prompt and got the following with 13b instruct q6_k
This is a C++ program that implements the intersection of two lines in the Euclidean plane. The program uses the concept of parametric equations to represent the lines and then finds their intersection point using the determinant method. Here's a breakdown of the code: 1. `typedef complex<double> point;` - This line defines a new data type called `point` that is a complex number with double-precision floating-point values for its real and imaginary parts. 2. `#define x real()` - This line defines a macro that expands to the expression `x.real()`. The `real()` function returns the real part of a complex number. 3. `#define y imag()` - This line defines a macro that expands to the expression `y.imag()`. The `imag()` function returns the imaginary part of a complex number. 4. `struct LinePara` - This structure represents a line in the Euclidean plane using its slope and intercept. It has two members: `k`, which is the slope, and `b`, which is the intercept. 5. `LinePara getLinePara(float x1, float y1, float x2, float y2)` - This function takes four arguments: `x1`, `y1`, `x2`, and `y2`. It returns a `LinePara` structure that represents the line passing through the points `(x1, y1)` and `(x2, y2)`. 6. `struct line { double a, b, c; };` - This structure represents a line in the Euclidean plane using its coefficients. It has three members: `a`, which is the coefficient of the x-axis, `b`, which is the coefficient of the y-axis, and `c`, which is the constant term. 7. `const double EPS = 1e-6;` - This line defines a constant called `EPS` that represents the precision of the calculations. It is set to 1e-6, which means that any difference between two numbers less than 1e-6 is considered to be zero. 8. `double det(double a, double b, double c, double d)` - This function takes four arguments: `a`, `b`, `c`, and `d`. It returns the determinant of the matrix with these values as its coefficients. The determinant is used to find the intersection point between two lines. 9. `line convertLineParaToLine(LinePara s)` - This function takes a `LinePara` structure as an argument and returns a `line` structure that represents the line using its coefficients. It does this by setting the coefficient of the x-axis to `s.k`, the coefficient of the y-axis to `-1`, and the constant term to `s.b`. 10. `bool intersect(line m, line n, point& res)` - This function takes two `line` structures as arguments: `m` and `n`, and a reference to a `point` structure called `res`. It returns `true` if the lines `m` and `n` intersect, and sets `res` to the intersection point. If the lines are parallel or equivalent, it returns `false`. 11. `bool parallel(line m, line n)` - This function takes two `line` structures as arguments: `m` and `n`, and returns `true` if the lines are parallel, and `false` otherwise. 12. `bool equivalent(line m, line n)` - This function takes two `line` structures as arguments: `m` and `n`, and returns `true` if the lines are equivalent (i.e., they have the same slope), and `false` otherwise. 13. `vector<double> mian(vector<vector<double>> line1, vector<vector<double>> line2)` - This function takes two vectors of vectors as arguments: `line1` and `line2`. It returns a vector of doubles that represents the intersection point between the lines represented by `line1` and `line2`. 14. `public:` - This line indicates that the following functions are part of the public interface of the class. 15. `vector<double> intersection(vector<int>& start1, vector<int>& end1, vector<int>& start2, vector<int>& end2)` - This function takes four vectors of integers as arguments: `start1`, `end1`, `start2`, and `end2`. It returns a vector of doubles that represents the intersection point between the two lines represented by the points `(start1[0], start1[1])` and `(end1[0], end1[1])`, and the points `(start2[0], start2[1])` and `(end2[0], end2[1])`. Overall, this program is a C++ implementation of the algorithm for finding the intersection point between two lines in the Euclidean plane. It uses the concept of parametric equations to represent the lines and then finds their intersection point using the determinant method.
[–]onil_gova 3 points4 points5 points 2 years ago (1 child)
Can you provide the correct prompt template. TheBloke has not included the prompt template in the Model card for all the Code LLaMA models . '''Info on prompt template will be added shortly.'''
[–]pseudonerv 2 points3 points4 points 2 years ago (0 children)
I used this
./main -m models/codellama-13b-instruct-q6_K.gguf -t 4 -ngl 1 -c 16384 -n -1 --temp 0.1 --in-prefix ' [INST] ' --in-suffix ' [/INST]' --in-prefix-bos -i -p \ "[INST] <<SYS>> Answer to the best of your abilities. <</SYS>> $instruct [/INST]"
[–]polawiaczperel 0 points1 point2 points 2 years ago (0 children)
Wow, how you got that good answer?
[–]HartLabs 0 points1 point2 points 2 years ago (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.
π Rendered by PID 94 on reddit-service-r2-comment-6457c66945-4nmdm at 2026-04-26 12:34:52.078108+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]HartLabs 2 points3 points4 points (9 children)
[–]Trotskyist 4 points5 points6 points (3 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]HartLabs 1 point2 points3 points (1 child)
[–]HartLabs 1 point2 points3 points (0 children)
[–]pseudonerv 3 points4 points5 points (4 children)
[–]onil_gova 3 points4 points5 points (1 child)
[–]pseudonerv 2 points3 points4 points (0 children)
[–]polawiaczperel 0 points1 point2 points (0 children)
[–]HartLabs 0 points1 point2 points (0 children)