ollama SmolLM家族

sshcrbum  于 2个月前  发布在  其他
关注(0)|答案(4)|浏览(42)

尝试自己添加这个,但一直遇到问题:

  • 提示模板不起作用,所以我尝试使用llama.cpp进行量化,因为这可能是ollama自动量化的问题。这是我无法正常工作的提示模板,供大家参考:
<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
  • llama.cpp不起作用,因为模型页面没有tokenizer.model文件。比我更有经验的人,请帮忙😭

此外,HF页面推荐使用以下参数:

PARAMETER temperature 0.6
PARAMETER top_p 0.92
lztngnrs

lztngnrs1#

看起来他们所有模型页面上的HF推断都失效了...

这与我使用chatMl提示模板(上面给出的)得到的大致相同的输出。

tf7tbtn2

tf7tbtn22#

这个空间似乎可以工作。也许应该从这里复制参数?

$x_1e^{0}f_1^x$

lkaoscv7

lkaoscv73#

我正在考虑将这个模型添加到库中。它可以使用Ollama转换进行转换和运行。以下是我运行它的方法:

  1. 从HuggingFace下载权重。
  2. 在刚刚下载的仓库目录中创建一个Modelfile文件:
FROM .
PARAMETER stop <|im_start|>
PARAMETER stop <|im_end|>
PARAMETER temperature 0.6
PARAMETER top_p 0.92

TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}{{ if .Prompt }}<|im_start|>user
{{ .Prompt }}<|im_end|>
{{ end }}<|im_start|>assistant
{{ .Response }}<|im_end|>
"""
  1. 使用Ollama CLI进行转换:
ollama create -f Modelfile smollm
  1. 运行模型:
ollama run smollm

这个模型似乎在其指令形式中针对非常具体的指令进行了训练:

> hello
Let $a,b \in (0,\infty)$ and $f$ be defined as: $$ f(x) = \begin{cases} x^{-1/2}\ln(1+ax^2) & \text{if } x>0 \\ 0 & \text{if } x=0 \end{cases}$$

The derivative of $f$ is given by: $$ f'(x) = \begin{cases} -\frac{a}{4}x^{-3/2}\ln(1+ax^2)+\frac{1}{2}(1+ax^2)\frac{2x}{1+ax^2} & \text{if } x>0 \\ 0 & \text{if } x=0 
\end{cases}$$

The second derivative of $f$ is: $$ f''(x) = \begin{cases} 
-\frac{3a}{8}\left(\ln(1+ax^2)-\frac{1}{ax^2}\right)+\frac{5}{4}(1+ax^2)\left(\frac{1-x^2}{ax^4}-2+\frac{7}{9}a\right) & \text{if } x>0 \\ 0 & \text{if } x=0 \end{cases}$$

The second derivative of $f$ is not equal to zero for all values of $x$. In fact, the second derivative has a local minimum at $x=-\frac{\ln(3)}{2a}$.

>>> List the steps to bake a chocolate cake from scratch.
Steps to bake a chocolate cake:

1. Gather ingredients (flour, sugar, cocoa powder, baking soda, salt, eggs, butter, milk, vanilla extract).
2. Preheat oven and prepare pans.
3. Combine dry ingredients in one bowl and wet ingredients in another.
4. Mix both mixtures together.
5. Pour batter into prepared pans.
6. Bake cake for 15-20 minutes or until toothpick inserted into center comes out clean.

有人有什么建议吗?考虑到模型的大小,这应该是我所期望的。

ne5o7dgx

ne5o7dgx4#

它可以使用Ollama转换器进行转换和运行。我也使用Ollama转换器运行了,但一直得到这个输出,所以我想可能出了什么问题?毕竟-Ollama转换器并不适用于所有情况。

相关问题