Dedicated Endpoints

Run this model inference on single tenant GPU with unmatched speed and reliability at scale.

Learn more
Container

Run this model inference with full control and performance in your environment.

Learn more

Get help setting up a custom Dedicated Endpoints.

Talk with our engineer to get a quote for reserved GPU instances with discounts.

README

License: apache-2.0

🧠 Como Funciona o Think-Vetor + TV-DSL?

O Think-Vetor combina o raciocínio latente contínuo (atratores Langevin-Hopfield regulados por PonderNet) com uma Linguagem de Programação Cognitiva (TV-DSL) gerada de forma estruturada dentro das tags de pensamento <thought>...</thought> (ex: [TV-DSL: multiply(432, 78)]).

Durante a inferência, o loop causal intercepta a chamada de computação, processa-a deterministicamente via interpretador de baixo nível (Python) e reinjeta o resultado (-> [RESULT: 33696]) de volta na fita de pensamento da LLM. Isso une a flexibilidade abstrata da rede neural com a precisão matemática infalível e livre de alucinações de um processador digital clássico.


🛠️ Como Carregar e Rodar a Inferência (Hugging Face Python API)

Você pode carregar e rodar este modelo em qualquer ambiente Python (incluindo o Google Colab ou a sua máquina local) utilizando as bibliotecas transformers e peft:

python

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_id = "Qwen/Qwen2.5-0.5B-Instruct"
adapter_id = "CromIA/think-vetor-0.5b-lora"
# Carregar o Tokenizer
tokenizer = AutoTokenizer.from_pretrained(adapter_id, trust_remote_code=True)
# Carregar o Modelo Base com otimização para CPU/GPU
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
dtype = torch.float16 if device.type == "cuda" else torch.float32
model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=dtype,
device_map="auto" if device.type == "cuda" else None,
trust_remote_code=True
)
# Acoplar adaptadores LoRA cognitivos
model = PeftModel.from_pretrained(model, adapter_id)
model.eval()
# Definir prompt de teste
prompt = "quanto é 432 vezes 78?"
messages = [
{"role": "system", "content": "Você é o Think-Vetor 1.5B, um assistente cognitivo híbrido dotado de cadeias de raciocínio de alta fidelidade e raciocínio lógico-matemático."},
{"role": "user", "content": prompt}
]
formatted_prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(formatted_prompt, return_tensors="pt").to(device)
print("\nRefletindo no Espaço Latente...")
with torch.no_grad():
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.1, do_sample=False)
# Decodificar
generated_text = tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
print("\nResposta do Modelo:", generated_text)

Model provider

CromIA

Model tree

Base

Qwen/Qwen2.5-0.5B-Instruct

Adapter

this model

Modalities

Input

Text

Output

Text

Pricing

Dedicated Endpoints

View details

Supported Functionality

Model APIs

Dedicated Endpoints

Container

More information

Explore FriendliAI today