累了的时候看看这个 |
现在AI进步飞快,企业因AI裁员也不少,感觉再不接触这东西,就被时代淘汰了
悄悄告诉你一个神秘的地址,想用啥AI,自己试试就知道了:dog
http://www.ieasyai.com
试试这个 ,刚发现的宝藏 。http://www.ieasyai.com/
找到了一个,好像是免费的
http://www.ieasyai.com/
@huhl_2009 我也用的这个,里面有GPT,文心、通义、讯飞,谷歌的Gemini都有
@jingqui123 你说得对
@huhl_2009 你开心就好哈,做ai相关谁说一定是要做模型了。。。你也就只知道模型了,哈哈
https://chat.aimakex.com/i/20280 这个好用 种类多 丰富
@testicles 你确定不是托?
垃圾不垃圾先不说,这四个字留给你妈,回去让你妈教育一下再出来发贴
@huhl_2009 C++ 实现topk算子,要求能够通过阈值进行筛选,在arm上时间复杂度最低,最好能够并行优化
```C++
// 并行排序线程函数
template<typename T>
void parallelSort(std::vector<T>& data, int start, int end) {
std::sort(data.begin() + start, data.begin() + end);
}
// 并行合并线程函数
template<typename T>
void parallelMerge(std::vector<T>& data, int start1, int end1, int start2, int end2, std::priority_queue<T>& result) {
int i = start1, j = start2;
while (i < end1 && j < end2) {
if (data[i] > data[j])
result.push(data[i++]);
else
result.push(data[j++]);
}
while (i < end1)
result.push(data[i++]);
while (j < end2)
result.push(data[j++]);
}
// 并行topk算子
template<typename T>
std::vector<T> parallelTopK(std::vector<T>& data, int k, T threshold) {
int dataSize = data.size();
int numThreads = std::thread::hardware_concurrency(); // 获取可用的CPU核心数
// 并行排序
std::vector<std::thread> sortThreads(numThreads);
int chunkSize = dataSize / numThreads;
int extraSize = dataSize % numThreads;
for (int i = 0; i < numThreads; ++i) {
int start = i * chunkSize;
int end = (i == numThreads - 1) ? (start + chunkSize + extraSize) : (start + chunkSize);
sortThreads[i] = std::thread(parallelSort<T>, std::ref(data), start, end);
}
for (int i = 0; i < numThreads; ++i)
sortThreads[i].join();
// 并行合并
std::priority_queue<T> result;
std::vector<std::thread> mergeThreads(numThreads);
int mergeSize = k / numThreads;
int mergeExtra = k % numThreads;
for (int i = 0; i < numThreads; ++i) {
int start = i * mergeSize;
int end = (i == numThreads - 1) ? (start + mergeSize + mergeExtra) : (start + mergeSize);
mergeThreads[i] = std::thread(parallelMerge<T>, std::ref(data), start, end, start, dataSize, std::ref(result));
}
for (int i = 0; i < numThreads; ++i)
mergeThreads[i].join();
// 提取topk结果
std::vector<T> topK;
while (!result.empty()) {
T element = result.top();
if (element >= threshold) // 根据阈值筛选
topK.push_back(element);
result.pop();
}
std::reverse(topK.begin(), topK.end()); // 由大到小排序
return topK;
}
int main() {
std::vector<int> data = {9, 4, 6, 2, 8, 5, 1, 7, 3};
int k = 4;
int threshold = 5;
std::vector<int> topK = parallelTopK(data, k, threshold);
std::cout << "Top " << k << " elements greater than or equal to " << threshold << ": ";
for (int i = 0; i < topK.size(); ++i)
std::cout << topK[i] << " ";
return 0;
}
```
@ycdhqzhiai 这我也不知道,
AI具体的回复是调用官方的模型,一个模型回答不满意,你可以试试其它的,像文心、通义千问啥的,上面都有,个人感觉谷歌Gemini还行
或者移动端用这个:https://github.com/mylxsw
@luffy_leo 昨天还是好的,应该是内部报错了,我刚看了几个其它平台的也这样
An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting
过早客微信公众号:guozaoke • 过早客新浪微博:@过早客 • 广告投放合作微信:fullygroup50 鄂ICP备2021016276号-2 • 鄂公网安备42018502001446号