Dmitriy-Zemskov commited on
Commit
c1e5c7f
·
verified ·
1 Parent(s): c207d2c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +27 -1
README.md CHANGED
@@ -67,4 +67,30 @@ Distributed under the **CalmaCat Public License (CCPL-1.0)**. See [LICENSE](./LI
67
 
68
  ## 🚀 Quick Start / Быстрый запуск
69
 
70
- Check out the `llama.cpp` CLI execution command in the repository files or run it locally using your preferred GGUF runner.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
 
68
  ## 🚀 Quick Start / Быстрый запуск
69
 
70
+ ```python
71
+ import torch
72
+ from transformers import AutoModelForCausalLM, AutoTokenizer
73
+
74
+ model_id = "ViorikaAI-org/CalmaCatCoder"
75
+
76
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
77
+ model = AutoModelForCausalLM.from_pretrained(
78
+ model_id,
79
+ torch_dtype=torch.float16,
80
+ device_map="auto"
81
+ )
82
+
83
+ prompt = "<|im_start|>user\nWrite a Python function for binary search.<|im_end|>\n<|im_start|>assistant\n"
84
+
85
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
86
+ outputs = model.generate(
87
+ **inputs,
88
+ max_new_tokens=256,
89
+ temperature=0.6,
90
+ top_p=0.9,
91
+ repetition_penalty=1.25,
92
+ do_sample=True
93
+ )
94
+
95
+ print(tokenizer.decode(outputs[0], skip_special_tokens=False))
96
+ ```