nvidia/llama-nemotron-embed-1b-v2-GGUF

import numpy as np
import torch
from llama_cpp import Llama
from sentence_transformers import SentenceTransformer
from sentence_transformers.util import cos_sim


model = SentenceTransformer(
    "nvidia/llama-nemotron-embed-1b-v2",
    trust_remote_code=True,
    model_kwargs={"dtype": torch.bfloat16},
)
llama = Llama.from_pretrained(
    repo_id="mykor/llama-nemotron-embed-1b-v2-GGUF",
    filename="llama-nemotron-embed-1B-v2-BF16.gguf",
    verbose=False,
    embedding=True,
    n_ctx=0,
)

text = """λ‚¨μ•„μžˆλ˜ λ‚˜λ₯Ό λ– λ‚˜
더 희미해지고
μ–΄λ–€ μ™Έλ‘œμ›€μ„ ν’ˆκ³ 
살아가더라도
λ‚΄κ²Œ λ‹Ώμ•˜λ˜ 기얡은
늘 μ°¬λž€ν•˜κ²Œ 번져
아직도 λ‚œ μ™œ μžŠμ§€λ„ λͺ»ν•˜κ³  또
μ™œ λ‚œ 더 더 μ™œ κ°‡νžŒ 것 같은데
겁에 질린 μ±„λ‘œ

μ²˜μŒμ΄λΌμ„œ 그래
κ°€ λ³Έ 적 μ—†λŠ” 길에
λ‚  μž μ‹œ μžŠμ€ 채
κ°€μ‹œλ₯Ό μ„Έμš΄ 채
μƒμ²˜λ‚œ κ½ƒμžŽμ²˜λŸΌ
λ–¨μ–΄μ§ˆ λ•Œ λ‚΄ 손을 μž‘μ•„μ€„λž˜
끝의 밀을 μ§€μšΈκ²Œ
λΉ›μœΌλ‘œ
늘

λ‚΄ λ§˜μ— ν•€ κ·Έλ¦ΌμžλŠ” λ‚  μ‚Όν‚€λŠ” λ“―ν•˜κ³ 
κΈ°λ‹€λ¦¬λ˜ 햇살은 λ‚ 
μŠ€μ³κ°€λ“― λ– λ‚˜κ³ 
겨우 맀달린 ν¬λ―Έν•œ 달빛은 λ―Έλ„λŸ¬μ Έ
아직도 λ‚œ λ²—μ–΄λ‚˜μ§ˆ λͺ»ν•˜κ³  또

μ™œ λ‚œ 더 더 μ™œ λ¬΄λ„ˆμ Έ κ°€λŠ”λ°
μ–΄μ©” 쀄 λͺ¨λ₯΄κ³ 

μ²˜μŒμ΄λΌμ„œ 그래
κ°€ λ³Έ 적 μ—†λŠ” 길에
λ‚  μž μ‹œ μžŠμ€ 채
κ°€μ‹œλ₯Ό μ„Έμš΄ 채
μƒμ²˜λ‚œ κ½ƒμžŽμ²˜λŸΌ
λ–¨μ–΄μ§ˆ λ•Œ λ‚΄ 손을 μž‘μ•„μ€„λž˜
끝의 밀을 μ§€μšΈκ²Œ
λΉ›μœΌλ‘œ

κ·Έλƒ₯ λ‹¬μ•„λ‚˜μž μ € λ„ˆλ¨Έμ—
μ–΄λ‘μ›Œμ§€λŠ” ν•˜λŠ˜μ΄
우릴 λ‹€μ‹œ 찾을 수 μ—†κ²Œ
검은 밀이
무섭지 μ•Šλ‹€κΈ°λ³΄λ‹¨
포기할 수 μžˆλŠ” 게 아냐

μ΄μ œμ„œμ•Ό 보이넀
이미 λ”°λœ»ν–ˆλŠ”λ°
고개λ₯Ό 떨ꡬ고
두 κ·€λ₯Ό 막고
λ‚΄ 곁을 μ§€μΌœμ£Όλ˜
널 놓칠 λ•Œ 또 ν•œλ²ˆ μž‘μ•„μ€„λž˜
μ•½μ†ν• κ²Œ μ°¬λž€ν•œ λ―Έμ†Œλ₯Ό

OH~ OH~ OH~
(κ·Έλƒ₯ λ‹¬μ•„λ‚˜μž μ € λ„ˆλ¨Έμ—
μ–΄λ‘μ›Œμ§€λŠ” ν•˜λŠ˜μ΄
우릴 λ‹€μ‹œ 찾을 수 μ—†κ²Œ
검은 밀이
무섭지 μ•Šλ‹€κΈ°λ³΄λ‹¨
포기할 수 μžˆλŠ” 게 아냐)

아침일 κ±°μ•Ό 우린 늘"""


embed1 = model.encode(text)
embed2 = np.array(llama.embed(text), dtype=np.float32)
print(cos_sim(embed1, embed2).item())
0.9999110698699951
Downloads last month
541
GGUF
Model size
1B params
Architecture
llama
Hardware compatibility
Log In to add your hardware

3-bit

4-bit

5-bit

6-bit

8-bit

16-bit

32-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for mykor/llama-nemotron-embed-1b-v2-GGUF

Quantized
(2)
this model