ariG23498 HF Staff commited on
Commit
2a37399
·
verified ·
1 Parent(s): d987c71

Upload tencent_KaLM-Embedding-Gemma3-12B-2511_0.txt with huggingface_hub

Browse files
tencent_KaLM-Embedding-Gemma3-12B-2511_0.txt ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```CODE:
2
+ from sentence_transformers import SentenceTransformer
3
+
4
+ model = SentenceTransformer("tencent/KaLM-Embedding-Gemma3-12B-2511")
5
+
6
+ sentences = [
7
+ "That is a happy person",
8
+ "That is a happy dog",
9
+ "That is a very happy person",
10
+ "Today is a sunny day"
11
+ ]
12
+ embeddings = model.encode(sentences)
13
+
14
+ similarities = model.similarity(embeddings, embeddings)
15
+ print(similarities.shape)
16
+ # [4, 4]
17
+ ```
18
+
19
+ ERROR:
20
+ Traceback (most recent call last):
21
+ File "/tmp/tencent_KaLM-Embedding-Gemma3-12B-2511_09Js31M.py", line 25, in <module>
22
+ model = SentenceTransformer("tencent/KaLM-Embedding-Gemma3-12B-2511")
23
+ File "/tmp/.cache/uv/environments-v2/6e4feb1551370b1f/lib/python3.13/site-packages/sentence_transformers/SentenceTransformer.py", line 367, in __init__
24
+ self.to(device)
25
+ ~~~~~~~^^^^^^^^
26
+ File "/tmp/.cache/uv/environments-v2/6e4feb1551370b1f/lib/python3.13/site-packages/torch/nn/modules/module.py", line 1371, in to
27
+ return self._apply(convert)
28
+ ~~~~~~~~~~~^^^^^^^^^
29
+ File "/tmp/.cache/uv/environments-v2/6e4feb1551370b1f/lib/python3.13/site-packages/torch/nn/modules/module.py", line 930, in _apply
30
+ module._apply(fn)
31
+ ~~~~~~~~~~~~~^^^^
32
+ File "/tmp/.cache/uv/environments-v2/6e4feb1551370b1f/lib/python3.13/site-packages/torch/nn/modules/module.py", line 930, in _apply
33
+ module._apply(fn)
34
+ ~~~~~~~~~~~~~^^^^
35
+ File "/tmp/.cache/uv/environments-v2/6e4feb1551370b1f/lib/python3.13/site-packages/torch/nn/modules/module.py", line 930, in _apply
36
+ module._apply(fn)
37
+ ~~~~~~~~~~~~~^^^^
38
+ [Previous line repeated 3 more times]
39
+ File "/tmp/.cache/uv/environments-v2/6e4feb1551370b1f/lib/python3.13/site-packages/torch/nn/modules/module.py", line 957, in _apply
40
+ param_applied = fn(param)
41
+ File "/tmp/.cache/uv/environments-v2/6e4feb1551370b1f/lib/python3.13/site-packages/torch/nn/modules/module.py", line 1357, in convert
42
+ return t.to(
43
+ ~~~~^
44
+ device,
45
+ ^^^^^^^
46
+ dtype if t.is_floating_point() or t.is_complex() else None,
47
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48
+ non_blocking,
49
+ ^^^^^^^^^^^^^
50
+ )
51
+ ^
52
+ torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 226.00 MiB. GPU 0 has a total capacity of 22.30 GiB of which 86.69 MiB is free. Process 26310 has 22.21 GiB memory in use. Of the allocated memory 21.97 GiB is allocated by PyTorch, and 1.79 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)