Views
No views yet
Candado/neuralnerve-webllm-models/
├── wasm-libs/ # Binarios WebGPU (.wasm)
│ ├── Phi-3.5-mini-instruct-q4f16_1-webgpu.wasm
│ └── Llama-3.2-3B-Instruct-q4f16_1-webgpu.wasm
├── Phi-3.5-mini-instruct/ # Archivos del modelo Phi 3.5
│ ├── config.json
│ ├── mlc-chat-config.json
│ ├── ndarray-cache.json
│ ├── tokenizer.json
│ └── params_shard_*.bin # Pesos del modelo
├── Llama-3.2-3B-Instruct/ # Archivos del modelo Llama
│ ├── config.json
│ ├── mlc-chat-config.json
│ ├── ndarray-cache.json
│ ├── tokenizer.json
│ └── params_shard_*.bin
├── MANIFEST.json # Checksums SHA-256
└── README.md # Este archivo1# 1. Clonar el repositorio
2git clone https://huggingface.co/Candado/neuralnerve-webllm-models
3cd neuralnerve-webllm-models
4
5# 2. Instalar Git LFS (si no lo tienes)
6git lfs install
7
8# 3. Ver modelos disponibles
9cd scripts
10node download-models.js
11
12# 4. Descargar modelos específicos
13node download-models.js Phi-3.5-mini-instruct-q4f16_1-MLC
14
15# O descargar múltiples modelos
16node download-models.js Llama-3.2-3B-Instruct-q4f32_1-MLC Phi-3.5-mini-instruct-q4f16_1-MLC1# 1. Descargar desde el CDN oficial de WebLLM
2wget -r -np -nH --cut-dirs=2 https://huggingface.co/mlc-ai/Phi-3.5-mini-instruct-q4f16_1-MLC/tree/main
3
4# 2. Calcular hashes SHA-256
5cd scripts
6node calculate-sha256.js ../Phi-3.5-mini-instruct-q4f16_1-MLC
7
8# 3. Copiar el output JSON al MANIFEST.json1// En tu aplicación NeuralNerve
2const engine = await CreateMLCEngine(
3 "Phi-3.5-mini-instruct-q4f16_1-MLC",
4 {
5 initProgressCallback: (progress) => {
6 console.log(progress);
7 }
8 }
9);1cd scripts
2node calculate-sha256.js ../Phi-3.5-mini-instruct-q4f16_1-MLCmodels:1{
2 "models": [
3 {
4 "name": "Phi-3.5-mini-instruct-q4f16_1-MLC",
5 "files": {
6 "config.json": "sha256-abc123...",
7 "tokenizer.json": "sha256-def456..."
8 }
9 }
10 ]
11}1git add .
2git commit -m "Add Phi-3.5-mini model with integrity hashes"
3git push1# 1. Trackear archivos grandes con Git LFS
2git lfs track "*.bin"
3git lfs track "*.safetensors"
4git lfs track "*.wasm"
5
6# 2. Agregar archivos
7git add .gitattributes
8git add Phi-3.5-mini-instruct-q4f16_1-MLC/
9git add wasm-libs/
10
11# 3. Commit y push
12git commit -m "Add Phi-3.5-mini model files"
13git push| Modelo | Tamaño | Uso Recomendado | RAM Necesaria |
|---|---|---|---|
| Phi-3.5-mini | 2.4GB | Chat general, soporte técnico | 4GB |
| Llama-3.2-1B | 1.2GB | Tareas rápidas, dispositivos limitados | 2GB |
| Llama-3.2-3B | 2.8GB | Balance velocidad/calidad | 4GB |
| SmolLM2-1.7B | 1.5GB | Tareas específicas, edge devices | 3GB |
1// 1. Configurar la URL base en tu app
2const MODEL_REGISTRY_URL = "https://huggingface.co/Candado/neuralnerve-webllm-models";
3
4// 2. Cargar MANIFEST.json
5const manifest = await fetch(`${MODEL_REGISTRY_URL}/raw/main/MANIFEST.json`)
6 .then(r => r.json());
7
8// 3. Verificar integridad antes de cargar
9const modelConfig = manifest.models.find(m => m.name === selectedModel);
10await verifyModelIntegrity(modelConfig);
11
12// 4. Cargar modelo desde tu repositorio
13const engine = await CreateMLCEngine(selectedModel, {
14 modelUrl: `${MODEL_REGISTRY_URL}/resolve/main/${selectedModel}/`,
15 wasmUrl: `${MODEL_REGISTRY_URL}/resolve/main/wasm-libs/`
16});