MCPcopy Create free account
hub / github.com/andrewkchan/deepseek.cpp / clip

Function clip

src/infer.cpp:644–646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

642}
643
644inline float clip(float x, float v) {
645 return x < -v ? -v : (x > v ? v : x);
646}
647
648static void rope(float* buf, float* vec, int d, int head_dim, int pos, float theta) {
649 // For some reason, DeepSeek-V2 was trained using rope output

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected