feirisu 最近的时间轴更新
feirisu

feirisu

V2EX 第 446181 号会员,加入于 2019-10-12 16:47:14 +08:00
Windows 下开发小应用 GUI,真的很难选方案
  •  3   
    程序员  •  feirisu  •  141 天前  •  最后回复来自 pollux
    122
    Gemini Pro 的 API 和国内的模型一样有前置关键词过滤
    OpenAI  •  feirisu  •  162 天前  •  最后回复来自 feirisu
    6
    腾讯云的 618 又加码了
    云计算  •  feirisu  •  2022-06-20 22:56:45 PM  •  最后回复来自 wkingnet
    9
    域名在国内部分区域被墙有遇到过的吗?
    程序员  •  feirisu  •  2022-05-27 10:40:52 AM  •  最后回复来自 feirisu
    26
    内网接入 LAN 口设备会影响其他设备的 DNS 解析
    宽带症候群  •  feirisu  •  2021-07-05 13:44:07 PM  •  最后回复来自 tankren
    8
    feirisu 最近回复了
    1 天前
    回复了 934831065ldc 创建的主题 OpenAI 使用 gpt4o,如何计算图片 token?
    c#代码,就是 auto 没测试是怎么自动 low 和 high 的


    public static int CalculateImageTokens(int width, int height, ImageDetailMode detailMode)
    {
    const int lowDetailCost = 85;
    const int highDetailCostPerSquare = 170;
    const int highDetailBaseCost = 85;
    const int maxDimension = 2048;
    const int targetShortSide = 768;
    const int squareSize = 512;


    if (detailMode == ImageDetailMode.None)
    {
    detailMode = ImageDetailMode.High; //
    }

    if (detailMode == ImageDetailMode.Low)
    {
    return lowDetailCost;
    }
    else if (detailMode == ImageDetailMode.High)
    {
    bool scaledToMax = false;

    // Scale down the image if either dimension exceeds the maximum allowed.
    if (width > maxDimension || height > maxDimension)
    {
    double scaleFactor = Math.Min((double)maxDimension / width, (double)maxDimension / height);
    width = (int)(width * scaleFactor);
    height = (int)(height * scaleFactor);
    scaledToMax = true;
    }

    // Further scale down the image only if it has been scaled in the previous step.
    if (scaledToMax)
    {
    double scaleToShortestSideFactor = (double)targetShortSide / Math.Min(width, height);
    width = (int)(width * scaleToShortestSideFactor);
    height = (int)(height * scaleToShortestSideFactor);
    }

    // Calculate how many 512px squares are needed to cover the image.
    int squaresAcross = (int)Math.Ceiling((double)width / squareSize);
    int squaresDown = (int)Math.Ceiling((double)height / squareSize);
    int totalSquares = squaresAcross * squaresDown;

    // Calculate final token cost for high detail images.
    return highDetailCostPerSquare * totalSquares + highDetailBaseCost;
    }

    return lowDetailCost;
    }
    自己付款公司报销吧,简单点

    公司业务中转慎用,有假中转,给你换别便宜模型返回数据。。。
    6 天前
    回复了 jabari 创建的主题 程序员 Windows 11 是不是有内存泄漏问题?
    任务管理器的用户标签里有没有多个用户登入?
    代码都不行,经常调用某些类不存在的函数,也就早期 gpt3.5 的水平,中文理解可能略强一点
    用 winrar 呀,几年前的干净版本
    35 天前
    回复了 dododada 创建的主题 程序员 AI 服务器配置报价
    这俩 4090 能跑 70B 的 chat 模型吗
    44 天前
    回复了 AoEiuV020JP 创建的主题 程序员 电脑内存都被谁占了
    44 天前
    回复了 AoEiuV020JP 创建的主题 程序员 电脑内存都被谁占了
    看看性能那里,“已提交”是虚拟内存,看看“使用中”多少,这个是物理的内存
    @twofox 不用那些二道贩子,还能更便宜点
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3174 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 17ms · UTC 11:29 · PVG 19:29 · LAX 04:29 · JFK 07:29
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.