Polish LLMs
Collection
Collection of Polish Language Models • 3 items • Updated • 1
How to use szymonrucinski/Krakowiak-7B-v3 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="szymonrucinski/Krakowiak-7B-v3") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("szymonrucinski/Krakowiak-7B-v3")
model = AutoModelForCausalLM.from_pretrained("szymonrucinski/Krakowiak-7B-v3")How to use szymonrucinski/Krakowiak-7B-v3 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "szymonrucinski/Krakowiak-7B-v3"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "szymonrucinski/Krakowiak-7B-v3",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/szymonrucinski/Krakowiak-7B-v3
How to use szymonrucinski/Krakowiak-7B-v3 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "szymonrucinski/Krakowiak-7B-v3" \
--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": "szymonrucinski/Krakowiak-7B-v3",
"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 "szymonrucinski/Krakowiak-7B-v3" \
--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": "szymonrucinski/Krakowiak-7B-v3",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use szymonrucinski/Krakowiak-7B-v3 with Docker Model Runner:
docker model run hf.co/szymonrucinski/Krakowiak-7B-v3
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
torch_device = "cuda" if torch.cuda.is_available() else "cpu"
chat_tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1")
chat_tokenized = chat_tokenizer.apply_chat_template(messages, tokenize=False)
model = AutoModelForCausalLM.from_pretrained("szymonrucinski/Krakowiak-7B-v3", device_map="cuda")
model.config.pad_token_id = model.config.eos_token_id
tokenizer.pad_token = tokenizer.eos_token
messages = [
{"role": "user", "content": "Czym jest Debian?"},
]
chat_tokenized = chat_tokenizer.apply_chat_template(messages, tokenize=False)
model_inputs = chat_tokenizer(chat_tokenized, return_tensors='pt').to(torch_device)
beam_outputs = model.generate(
**model_inputs,
max_new_tokens=512,
num_beams=5,
no_repeat_ngram_size=2,
num_return_sequences=1,
early_stopping=True
)
print(tokenizer.decode(beam_outputs[0], skip_special_tokens=True))
[INST] Czym jest Debian? [/INST]
"Debian" to dystrybucja Linuksa, która została po raz pierwszy wydana w 1993 roku przez Iana Murdocka. Jest to jedna z
najstarszych i najbardziej uznanych systemów operacyjnych opartych na Linuxie, znana ze swojej stabilności, bezpieczeństwa i długoterminowego wsparcia.
Pierwsza oficjalna wersja systemu, nazwana "debian-0.01", ukazała się w sierpniu 2009 roku. Od tego czasu system przeszedł liczne aktualizacje
i ulepszenia, a obecnie jest na bardzo zaawansowanym poziomie rozwoju i wspierany przez dużą społeczność użytkowników i deweloperów.
Współcześnie dostępne są różne odgałęzienia i edycje debiana, takie jak debian stretch, buster, bullseye i inne, zapewniające szeroki zakres możliwości i zastosowań.
Jakie są najważniejsze cechy i korzyści z używania Debiani?
1. Stabilny i niezawodny system: Dzięki starannemu procesowi testowania i ciągłemu monitorowaniu wydaje się, że system jest stosunkowo wolny od
błędów, awarii i problemów z kompatybilnością. To czyni go doskonałym wyborem dla osób, które wymagają stabilnego środowiska pracy lub serwerów
produkcyjnych, w których nie mogą sobie pozwolić na nieprzewidywalne awarie lub problemy z funkcjami systemowymi lub aplikacyjnymi.
2. Bezpieczne i skonfigurowane do zadań serwera: System jest zaprojektowany z myślą o zadaniach krytycznych.