HuggingFaceFW/fineweb-edu
Viewer • Updated • 3.5B • 370k • 1.19k
How to use merterbak/Seed-0.5B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="merterbak/Seed-0.5B", trust_remote_code=True) # Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("merterbak/Seed-0.5B", trust_remote_code=True, dtype="auto")How to use merterbak/Seed-0.5B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "merterbak/Seed-0.5B"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "merterbak/Seed-0.5B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/merterbak/Seed-0.5B
How to use merterbak/Seed-0.5B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "merterbak/Seed-0.5B" \
--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": "merterbak/Seed-0.5B",
"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 "merterbak/Seed-0.5B" \
--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": "merterbak/Seed-0.5B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use merterbak/Seed-0.5B with Docker Model Runner:
docker model run hf.co/merterbak/Seed-0.5B
sample-10BT for achieving good results with low token size.GitHub: merterbak/llm-from-scratch
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("merterbak/Seed-0.5B")
model = AutoModelForCausalLM.from_pretrained(
"merterbak/Seed-0.5B",
trust_remote_code=True,
dtype="auto"
)
prompt = "Climate change can affect"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
temperature=0.3,
top_k=40,
do_sample=True,
repetition_penalty=1.2,
no_repeat_ngram_size=3,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))