Text Generation
PEFT
Safetensors
Transformers
qwen2
grpo
lora
trl
conversational
text-generation-inference
Instructions to use bimabk/environment_test_affine with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use bimabk/environment_test_affine with PEFT:
Base model is not found.
- Transformers
How to use bimabk/environment_test_affine with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bimabk/environment_test_affine") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bimabk/environment_test_affine") model = AutoModelForCausalLM.from_pretrained("bimabk/environment_test_affine", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bimabk/environment_test_affine with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bimabk/environment_test_affine" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bimabk/environment_test_affine", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/bimabk/environment_test_affine
- SGLang
How to use bimabk/environment_test_affine 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 "bimabk/environment_test_affine" \ --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": "bimabk/environment_test_affine", "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 "bimabk/environment_test_affine" \ --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": "bimabk/environment_test_affine", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use bimabk/environment_test_affine with Docker Model Runner:
docker model run hf.co/bimabk/environment_test_affine
Upload task output 1
Browse files- config.json +16 -8
- model.safetensors +2 -2
config.json
CHANGED
|
@@ -7,9 +7,9 @@
|
|
| 7 |
"dtype": "bfloat16",
|
| 8 |
"eos_token_id": 151645,
|
| 9 |
"hidden_act": "silu",
|
| 10 |
-
"hidden_size":
|
| 11 |
"initializer_range": 0.02,
|
| 12 |
-
"intermediate_size":
|
| 13 |
"layer_types": [
|
| 14 |
"full_attention",
|
| 15 |
"full_attention",
|
|
@@ -38,14 +38,22 @@
|
|
| 38 |
"full_attention",
|
| 39 |
"full_attention",
|
| 40 |
"full_attention",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
"full_attention"
|
| 42 |
],
|
| 43 |
"max_position_embeddings": 32768,
|
| 44 |
-
"max_window_layers":
|
| 45 |
"model_type": "qwen2",
|
| 46 |
-
"num_attention_heads":
|
| 47 |
-
"num_hidden_layers":
|
| 48 |
-
"num_key_value_heads":
|
| 49 |
"pad_token_id": null,
|
| 50 |
"rms_norm_eps": 1e-06,
|
| 51 |
"rope_parameters": {
|
|
@@ -53,9 +61,9 @@
|
|
| 53 |
"rope_type": "default"
|
| 54 |
},
|
| 55 |
"sliding_window": null,
|
| 56 |
-
"tie_word_embeddings":
|
| 57 |
"transformers_version": "5.1.0",
|
| 58 |
"use_cache": true,
|
| 59 |
"use_sliding_window": false,
|
| 60 |
-
"vocab_size":
|
| 61 |
}
|
|
|
|
| 7 |
"dtype": "bfloat16",
|
| 8 |
"eos_token_id": 151645,
|
| 9 |
"hidden_act": "silu",
|
| 10 |
+
"hidden_size": 2048,
|
| 11 |
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 11008,
|
| 13 |
"layer_types": [
|
| 14 |
"full_attention",
|
| 15 |
"full_attention",
|
|
|
|
| 38 |
"full_attention",
|
| 39 |
"full_attention",
|
| 40 |
"full_attention",
|
| 41 |
+
"full_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"full_attention",
|
| 44 |
+
"full_attention",
|
| 45 |
+
"full_attention",
|
| 46 |
+
"full_attention",
|
| 47 |
+
"full_attention",
|
| 48 |
+
"full_attention",
|
| 49 |
"full_attention"
|
| 50 |
],
|
| 51 |
"max_position_embeddings": 32768,
|
| 52 |
+
"max_window_layers": 70,
|
| 53 |
"model_type": "qwen2",
|
| 54 |
+
"num_attention_heads": 16,
|
| 55 |
+
"num_hidden_layers": 36,
|
| 56 |
+
"num_key_value_heads": 2,
|
| 57 |
"pad_token_id": null,
|
| 58 |
"rms_norm_eps": 1e-06,
|
| 59 |
"rope_parameters": {
|
|
|
|
| 61 |
"rope_type": "default"
|
| 62 |
},
|
| 63 |
"sliding_window": null,
|
| 64 |
+
"tie_word_embeddings": true,
|
| 65 |
"transformers_version": "5.1.0",
|
| 66 |
"use_cache": true,
|
| 67 |
"use_sliding_window": false,
|
| 68 |
+
"vocab_size": 151936
|
| 69 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:84a818b6851ccc1ef74d75dd1041a284ff97e169342cff118f06248349f68f61
|
| 3 |
+
size 6171927112
|