HuggingFaceTB/cosmopedia
Viewer • Updated • 31.1M • 19k • 721
How to use VedaX-Labs/VedaX-0.7B-Base with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="VedaX-Labs/VedaX-0.7B-Base") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("VedaX-Labs/VedaX-0.7B-Base")
model = AutoModelForCausalLM.from_pretrained("VedaX-Labs/VedaX-0.7B-Base")How to use VedaX-Labs/VedaX-0.7B-Base with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "VedaX-Labs/VedaX-0.7B-Base"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "VedaX-Labs/VedaX-0.7B-Base",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/VedaX-Labs/VedaX-0.7B-Base
How to use VedaX-Labs/VedaX-0.7B-Base with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "VedaX-Labs/VedaX-0.7B-Base" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "VedaX-Labs/VedaX-0.7B-Base",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker run --gpus all \
--shm-size 32g \
-p 30000:30000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
--env "HF_TOKEN=<secret>" \
--ipc=host \
lmsysorg/sglang:latest \
python3 -m sglang.launch_server \
--model-path "VedaX-Labs/VedaX-0.7B-Base" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "VedaX-Labs/VedaX-0.7B-Base",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use VedaX-Labs/VedaX-0.7B-Base with Docker Model Runner:
docker model run hf.co/VedaX-Labs/VedaX-0.7B-Base
VedaX-0.7B-Base is a lightweight open-weight language model developed by VedaX Labs. The model is designed for efficient conversational AI, reasoning tasks, and lightweight deployment on consumer hardware. The model is entirely trained on CPU and on cosmopedia dataset
VedaX-0.7B-Base is intended for:
The model was trained on a mixture of publicly available text datasets and curated instruction-style data.
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "VedaX-Labs/VedaX-0.7B-Base"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
prompt = "The magic forest was"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_new_tokens=128
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Developed by VedaX Labs.