从模型创建Ollama失败,

44u64gxh  于 2个月前  发布在  其他
关注(0)|答案(1)|浏览(41)

问题:在尝试从llama.meta.com下载模型时遇到了问题,无法处理Tensor。

解决方案:这个问题可能与您之前提到的另一个问题有关,即无法直接从Ollama下载模型。您可以尝试以下方法来解决这个问题:

  1. 确保您的网络连接正常,没有防火墙或代理限制访问Ollama。

  2. 检查您的OLLAMA_HOST和OLLAMA_INTEL_GPU设置是否正确。如果需要,您可以在本地运行Ollama服务器以进行测试。

  3. 如果问题仍然存在,您可以尝试手动将模型文件(如.h5、.pt等)上传到Ollama服务器,然后在本地使用这些文件创建模型。要实现这一点,您需要在Ollama服务器上运行一个HTTP服务器(如Flask或FastAPI),并提供一个用于上传模型文件的API端点。
    INFO [wmain] build info | build=3440 commit="d94c6e0c" tid="21640" timestamp=1722265303
    INFO [wmain] system info | n_threads=16 n_threads_batch=-1 system_info="AVX = 1 | AVX_VNNI = 0 | AVX2 = 0 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | AVX512_BF16 = 0 | FMA = 0 | NEON = 0 | SVE = 0 | ARM_FMA = 0 | F16C = 0 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | SSSE3 = 1 | VSX = 0 | MATMUL_INT8 = 0 | LLAMAFILE = " " "tid=" "21640" timestamp=1722265303 total_threads=32
    INFO [wmain] HTTP server listening | hostname="127.0.0.1" n_threads_http="31" port="63814" tid="21640" timestamp=1722265303
    time=2024-07-29T23:01:44.074+08:00 level=INFO source=server.go:617 msg="waiting for server to become available" status="llm server loading model"
    llama_model_loader: loaded meta data with 29 key-value pairs and 291 tensors from C:\Users\rtx.ollama\models\blobs\sha256-87048bcd55216712ef14c11c2c303728463207b165bf18440b9b84b07ec00f87 (version GGUF V3 (latest))
    llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
    llama_model_loader: - kv 0: general.architecture str = llama
    llama_model_loader: - kv 1: general.type str = model
    llama_model_loader: - kv 2: general.name str = Meta Llama 3.1 8B Instruct
    llama_model_loader: - kv 3: general.finetune str = Instruct
    llama_model_loader: - kv 4: general.basename str = Meta-Llama-3.1
    llama_model_loader: - kv 5: general.size_label str = 8B
    llama_model_loader: - kv 6: general.license str = llama3.1
    llama_model_loader: - kv 7: general.tags arr[str,6] = ["facebook", "meta", "pytorch", "llam...
    ...
    这个错误是由于在分配内存时出现了问题,导致程序无法继续运行。具体来说,是在尝试为一个大小为117440512字节的数组分配内存时,系统报告了错误。这可能是因为系统的可用内存不足以满足程序的需求。你可以尝试以下方法来解决这个问题:

  4. 关闭一些不需要的应用程序或服务,以释放更多的内存供程序使用。

  5. 如果可能的话,增加系统的物理内存。

  6. 检查程序是否存在内存泄漏,即未正确释放已分配的内存。如果发现内存泄漏,需要修复它以减少对系统内存的需求。
    这段文本是一段堆栈跟踪信息,它显示了程序在运行过程中的函数调用顺序。每一行都代表一个函数调用,其中包含了函数的地址、帧指针(fp)和程序计数器(pc)。这些信息可以帮助开发者定位程序中的错误和性能瓶颈。
    这是一段关于Go语言垃圾回收(GC)的日志,显示了不同goroutine在执行过程中的状态和事件。从日志中可以看到,这些goroutine主要参与了垃圾回收操作,包括标记、清理和回收等过程。同时,还有一些goroutine处于空闲状态,等待新的任务分配。
    The output is a log of garbage collection (GC) events in a Go program. Each line represents a GC event, with information about the goroutine that triggered the event, the time it occurred, and the state of the program at the time of the event.

In this case, the output shows several GC events occurring over a period of 54 minutes. Each event includes information about the goroutine that was running when the GC occurred, as well as the state of the program at the time of the event. The events are labeled as either "idle" or "working", indicating whether the GC worker was waiting for something to happen or actively working on collecting garbage.

Overall, this output provides valuable information about how the garbage collector is operating in a particular program, including which goroutines are being used and how long they have been running. This can help developers identify potential issues with memory usage or performance, and make adjustments to their code as needed.
The output shows the garbage collection (GC) activities in a Go program. The text is written in Markdown format, which can be translated to HTML using appropriate syntax.

Here's the translation:

<pre>
created by runtime.gcBgMarkStartWorkers in goroutine 1
runtime/mgc.go:1234 +0x1c
goroutine 22 gp=0xc000500700 m=nil [GC worker (idle), 54 minutes]:
 runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
 runtime/proc.go:402 +0xce fp=0xc00051bf50 sp=0xc00051bf30 pc=0x86176e
 runtime.gcBgMarkWorker()
 runtime/mgc.go:1310 +0xe5 fp=0xc00051bfe0 sp=0xc00051bf50 pc=0x842205
 runtime.goexit({})
 runtime/asm_amd64.s:1695 +0x1 fp=0xc00051bfe8 sp=0xc00051bfe0 pc=0x892481
 created by runtime.gcBgMarkStartWorkers in goroutine 1
runtime/mgc.go:1234 +0x1c
goroutine 52 gp=0xc000580380 m=nil [GC worker (idle), 54 minutes]:
 runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
 runtime/proc.go:402 +0xce fp=0xc000517f50 sp=0xc000517f30 pc=0x86176e
 runtime.gcBgMarkWorker()
 runtime/mgc.go:1310 +0xe5 fp=0xc000517fe0 sp=0xc000517f50 pc=0x842205
 runtime.goexit({})
 runtime/asm_amd64.s:1695 +0x1 fp=0xc000517fe8 sp=0xc000517fe0 pc=0x892481
 created by runtime.gcBgMarkStartWorkers in goroutine 1
runtime/mgc.go:1234 +0x1c
goroutine 53 gp=0xc000580540 m=nil [GC worker (idle)]:
 runtime.gopark(0x63eee4216ee8?, 0x1?, 0x9c?, 0x7a?, 0x0?)
 runtime/proc.go:402 +0xce fp=
这是一段Go语言的堆栈跟踪信息,它显示了程序运行过程中的一些函数调用和变量状态。从这个信息中,我们可以看到以下几点:

1. 程序在创建时调用了`runtime.gcBgMarkStartWorkers`函数,用于开始垃圾回收后台工作线程。
2. 在程序运行过程中,有多个goroutine(轻量级线程)被创建和销毁。这些goroutine主要负责处理网络请求、执行定时任务等。
3. 程序中使用了`runtime/mgc`包中的一些函数,如`runtime.gopark`、`runtime.gcBgMarkWorker`等,用于调度和管理goroutine。
4. 程序中还使用了`runtime/select`包中的`selectgo`和`select`函数,用于实现协程间的同步和选择。
5. 程序在执行过程中遇到了一些错误,导致部分goroutine提前退出。例如,在处理网络请求时发生了超时,或者在执行定时任务时发生了死循环等。
6. 最后,程序通过调用`runtime.goexit`函数退出。
这个query是一个错误日志,它描述了一个在运行过程中出现的异常情况。从日志中可以看出,程序在执行过程中遇到了一个`runtime.goexit()`调用,导致程序退出。具体的错误原因需要进一步分析日志中的其他信息。
nwnhqdif

nwnhqdif1#

根据我的猜测,您可能正在尝试在没有足够资源的机器上创建模型。有更简单的方法可以实现,即从huggingface下载量化模型并使用它:

相关问题