Text Generation
Transformers
Safetensors
Turkish
English
llama
smollm2
turkish
pretrained-from-scratch
conversational
text-generation-inference
Instructions to use bcckfdn/cevher2-test-9 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bcckfdn/cevher2-test-9 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bcckfdn/cevher2-test-9") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bcckfdn/cevher2-test-9") model = AutoModelForCausalLM.from_pretrained("bcckfdn/cevher2-test-9", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bcckfdn/cevher2-test-9 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bcckfdn/cevher2-test-9" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bcckfdn/cevher2-test-9", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/bcckfdn/cevher2-test-9
- SGLang
How to use bcckfdn/cevher2-test-9 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "bcckfdn/cevher2-test-9" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bcckfdn/cevher2-test-9", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
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 "bcckfdn/cevher2-test-9" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bcckfdn/cevher2-test-9", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use bcckfdn/cevher2-test-9 with Docker Model Runner:
docker model run hf.co/bcckfdn/cevher2-test-9
Upload folder using huggingface_hub
Browse files- README.md +28 -0
- chat_template.jinja +1 -0
- config.json +32 -0
- generation_config.json +13 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +77 -0
README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language: [tr, en]
|
| 4 |
+
library_name: transformers
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
tags: [smollm2, llama, turkish, pretrained-from-scratch]
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# cevher-2-test
|
| 10 |
+
|
| 11 |
+
SmolLM2 (Llama) mimarisiyle sıfırdan eğitilmiş 1514M parametreli dil modeli.
|
| 12 |
+
|
| 13 |
+
| | |
|
| 14 |
+
|---|---|
|
| 15 |
+
| Parametre | 1,513,546,496 |
|
| 16 |
+
| Katman | 34 |
|
| 17 |
+
| Hidden | 1792 |
|
| 18 |
+
| Head (Q/KV) | 28 / 7 |
|
| 19 |
+
| Context | 8192 |
|
| 20 |
+
| Vocab | 65,536 |
|
| 21 |
+
| Eğitim token | 6.881 B |
|
| 22 |
+
| En iyi val loss | 2.8658 |
|
| 23 |
+
|
| 24 |
+
```python
|
| 25 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 26 |
+
tok = AutoTokenizer.from_pretrained("bcckfdn/cevher2-test-9")
|
| 27 |
+
m = AutoModelForCausalLM.from_pretrained("bcckfdn/cevher2-test-9")
|
| 28 |
+
```
|
chat_template.jinja
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\n' + 'You are Cevher, a helpful AI assistant.' + '<|im_end|>\n' }}{% endif %}{% if message['role'] == 'assistant' %}{{ '<|im_start|>assistant\n' }}{% if message.reasoning is defined and message.reasoning %}{{ '<think>\n' + message['reasoning'] + '\n</think>\n' }}{% endif %}{{ message['content'] + '<|im_end|>\n' }}{% else %}{{ '<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>\n' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}
|
config.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"eos_token_id": 0,
|
| 9 |
+
"pad_token_id": 0,
|
| 10 |
+
"head_dim": 64,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 1792,
|
| 13 |
+
"initializer_range": 0.0236227795630767,
|
| 14 |
+
"intermediate_size": 6144,
|
| 15 |
+
"is_llama_config": true,
|
| 16 |
+
"max_position_embeddings": 8192,
|
| 17 |
+
"mlp_bias": false,
|
| 18 |
+
"model_type": "llama",
|
| 19 |
+
"num_attention_heads": 28,
|
| 20 |
+
"num_hidden_layers": 34,
|
| 21 |
+
"num_key_value_heads": 7,
|
| 22 |
+
"pretraining_tp": 1,
|
| 23 |
+
"rms_norm_eps": 5.7142857142857145e-06,
|
| 24 |
+
"rope_interleaved": false,
|
| 25 |
+
"rope_scaling": null,
|
| 26 |
+
"rope_theta": 100000.0,
|
| 27 |
+
"tie_word_embeddings": true,
|
| 28 |
+
"torch_dtype": "bfloat16",
|
| 29 |
+
"transformers_version": "4.46.0",
|
| 30 |
+
"use_cache": true,
|
| 31 |
+
"vocab_size": 65536
|
| 32 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 0,
|
| 4 |
+
"eos_token_id": 0,
|
| 5 |
+
"pad_token_id": 0,
|
| 6 |
+
"do_sample": true,
|
| 7 |
+
"temperature": 0.7,
|
| 8 |
+
"top_p": 0.9,
|
| 9 |
+
"top_k": 50,
|
| 10 |
+
"repetition_penalty": 1.1,
|
| 11 |
+
"max_new_tokens": 512,
|
| 12 |
+
"transformers_version": "4.46.0"
|
| 13 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3f740ffadb564f7ce5d87cba7ac68870608d7e2395a9b1966e29be7e57b71c7f
|
| 3 |
+
size 3027128528
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<|endoftext|>",
|
| 4 |
+
"clean_up_tokenization_spaces": false,
|
| 5 |
+
"eos_token": "<|endoftext|>",
|
| 6 |
+
"extra_special_tokens": [
|
| 7 |
+
"<|im_start|>",
|
| 8 |
+
"<|im_end|>",
|
| 9 |
+
"<think>",
|
| 10 |
+
"</think>",
|
| 11 |
+
"<tool_call>",
|
| 12 |
+
"</tool_call>",
|
| 13 |
+
"<tool_response>",
|
| 14 |
+
"</tool_response>",
|
| 15 |
+
"<tools>",
|
| 16 |
+
"</tools>",
|
| 17 |
+
"<|fim_prefix|>",
|
| 18 |
+
"<|fim_middle|>",
|
| 19 |
+
"<|fim_suffix|>",
|
| 20 |
+
"<|fim_pad|>",
|
| 21 |
+
"<repo_name>",
|
| 22 |
+
"<file_sep>",
|
| 23 |
+
"<filename>",
|
| 24 |
+
"<gh_stars>",
|
| 25 |
+
"<issue_start>",
|
| 26 |
+
"<issue_comment>",
|
| 27 |
+
"<issue_closed>",
|
| 28 |
+
"<jupyter_start>",
|
| 29 |
+
"<jupyter_text>",
|
| 30 |
+
"<jupyter_code>",
|
| 31 |
+
"<jupyter_output>",
|
| 32 |
+
"<jupyter_script>",
|
| 33 |
+
"<empty_output>",
|
| 34 |
+
"<|system|>",
|
| 35 |
+
"<|user|>",
|
| 36 |
+
"<|assistant|>",
|
| 37 |
+
"<|pad|>",
|
| 38 |
+
"<|reserved_0|>",
|
| 39 |
+
"<|reserved_1|>",
|
| 40 |
+
"<|reserved_2|>",
|
| 41 |
+
"<|reserved_3|>",
|
| 42 |
+
"<|reserved_4|>",
|
| 43 |
+
"<|reserved_5|>",
|
| 44 |
+
"<|reserved_6|>",
|
| 45 |
+
"<|reserved_7|>",
|
| 46 |
+
"<|reserved_8|>",
|
| 47 |
+
"<|reserved_9|>",
|
| 48 |
+
"<|reserved_10|>",
|
| 49 |
+
"<|reserved_11|>",
|
| 50 |
+
"<|reserved_12|>",
|
| 51 |
+
"<|reserved_13|>",
|
| 52 |
+
"<|reserved_14|>",
|
| 53 |
+
"<|reserved_15|>",
|
| 54 |
+
"<|reserved_16|>",
|
| 55 |
+
"<|reserved_17|>",
|
| 56 |
+
"<|reserved_18|>",
|
| 57 |
+
"<|reserved_19|>",
|
| 58 |
+
"<|reserved_20|>",
|
| 59 |
+
"<|reserved_21|>",
|
| 60 |
+
"<|reserved_22|>",
|
| 61 |
+
"<|reserved_23|>",
|
| 62 |
+
"<|reserved_24|>",
|
| 63 |
+
"<|reserved_25|>",
|
| 64 |
+
"<|reserved_26|>",
|
| 65 |
+
"<|reserved_27|>",
|
| 66 |
+
"<|reserved_28|>",
|
| 67 |
+
"<|reserved_29|>",
|
| 68 |
+
"<|reserved_30|>",
|
| 69 |
+
"<|reserved_31|>"
|
| 70 |
+
],
|
| 71 |
+
"is_local": false,
|
| 72 |
+
"local_files_only": false,
|
| 73 |
+
"model_max_length": 8192,
|
| 74 |
+
"pad_token": "<|endoftext|>",
|
| 75 |
+
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 76 |
+
"unk_token": "<|endoftext|>"
|
| 77 |
+
}
|