MiniCPM-2B-dpo-bf16实战案例:用24亿参数模型构建智能问答系统
2026/6/2 21:07:00
部分补环境代码
!(() => { "use strict"; const $toString = Function.toString; const myFunction_toString_symbol = Symbol('('.concat('', ')_', (Math.random() + '').toString(36))); const myToString = function () { return typeof this == 'function' && this[myFunction_toString_symbol] || $toString.call(this); }; function set_native(func, key, value) { Object.defineProperty(func, key, { "enumerable": false, "configurable": true, "writable": true, "value": value }) }; delete Function.prototype['toString']; //删除原型链上的toString set_native(Function.prototype, "toString", myToString); //自己定义个getter方法 set_native(Function.prototype.toString, myFunction_toString_symbol, "function toString() { [native code] }"); //套个娃 保护一下我们定义的toString 否则就暴露了 this.func_set_natvie = (func) => { set_native(func, myFunction_toString_symbol, `function ${myFunction_toString_symbol, func.name || ''}() { [native code] }`); }; //导出函数到globalThis }).call(this); cl=console.log appkey = "" XMLHttpRequest=function(){} Window = function Window() { throw new TypeError('Illegal constructor') }; this.func_set_natvie(Window); Window.prototype.PERSISTENT = 1 Window.prototype.TEMPORARY = 0 Navigator = function Navigator() { throw new TypeError('Illegal constructor') }; this.func_set_natvie(Navigator); this.func_set_natvie(atob); this.func_set_natvie(btoa); window = global Object.defineProperties(Window.prototype, { [Symbol.toStringTag]: { value: 'Window', configurable: true } }) Object.defineProperties(Navigator.prototype, { [Symbol.toStringTag]: { value: 'Navigator', configurable: true } }) window.__proto__ = Window.prototype window.Notification = function Notification() { console.log('window.Notification', arguments) };