Text Generation
Transformers
TensorBoard
Safetensors
mistral
alignment-handbook
trl
sft
Generated from Trainer
conversational
text-generation-inference
Instructions to use CharlesLi/mistral_llama_2_code_math_3_full with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CharlesLi/mistral_llama_2_code_math_3_full with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CharlesLi/mistral_llama_2_code_math_3_full") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CharlesLi/mistral_llama_2_code_math_3_full") model = AutoModelForCausalLM.from_pretrained("CharlesLi/mistral_llama_2_code_math_3_full") 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 CharlesLi/mistral_llama_2_code_math_3_full with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CharlesLi/mistral_llama_2_code_math_3_full" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CharlesLi/mistral_llama_2_code_math_3_full", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/CharlesLi/mistral_llama_2_code_math_3_full
- SGLang
How to use CharlesLi/mistral_llama_2_code_math_3_full 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 "CharlesLi/mistral_llama_2_code_math_3_full" \ --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": "CharlesLi/mistral_llama_2_code_math_3_full", "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 "CharlesLi/mistral_llama_2_code_math_3_full" \ --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": "CharlesLi/mistral_llama_2_code_math_3_full", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use CharlesLi/mistral_llama_2_code_math_3_full with Docker Model Runner:
docker model run hf.co/CharlesLi/mistral_llama_2_code_math_3_full
Model save
Browse files- README.md +1 -6
- model-00001-of-00003.safetensors +1 -1
- model-00002-of-00003.safetensors +1 -1
- model-00003-of-00003.safetensors +1 -1
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -3,12 +3,9 @@ library_name: transformers
|
|
| 3 |
license: apache-2.0
|
| 4 |
base_model: mistralai/Mistral-7B-Instruct-v0.1
|
| 5 |
tags:
|
| 6 |
-
- alignment-handbook
|
| 7 |
-
- trl
|
| 8 |
-
- sft
|
| 9 |
-
- generated_from_trainer
|
| 10 |
- trl
|
| 11 |
- sft
|
|
|
|
| 12 |
- generated_from_trainer
|
| 13 |
datasets:
|
| 14 |
- generator
|
|
@@ -23,8 +20,6 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 23 |
# mistral_llama_2_code_math_3_full
|
| 24 |
|
| 25 |
This model is a fine-tuned version of [mistralai/Mistral-7B-Instruct-v0.1](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1) on the generator dataset.
|
| 26 |
-
It achieves the following results on the evaluation set:
|
| 27 |
-
- Loss: 0.5239
|
| 28 |
|
| 29 |
## Model description
|
| 30 |
|
|
|
|
| 3 |
license: apache-2.0
|
| 4 |
base_model: mistralai/Mistral-7B-Instruct-v0.1
|
| 5 |
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
- trl
|
| 7 |
- sft
|
| 8 |
+
- alignment-handbook
|
| 9 |
- generated_from_trainer
|
| 10 |
datasets:
|
| 11 |
- generator
|
|
|
|
| 20 |
# mistral_llama_2_code_math_3_full
|
| 21 |
|
| 22 |
This model is a fine-tuned version of [mistralai/Mistral-7B-Instruct-v0.1](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1) on the generator dataset.
|
|
|
|
|
|
|
| 23 |
|
| 24 |
## Model description
|
| 25 |
|
model-00001-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4943162336
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5ab6c1dce9fc9fe3e80d241a48a835f5c6cd8ab9c7dea6f12b8b6ceeef7c89a6
|
| 3 |
size 4943162336
|
model-00002-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4999819336
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8569a0e447099b428d092f96237ca550cd2a15c235c81f15f7dfc43b2b283a15
|
| 3 |
size 4999819336
|
model-00003-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4540516344
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f06d0c19e04315ae2caedf95a769ed0db6c2fcab7efd1dc42502c10ae91866b6
|
| 3 |
size 4540516344
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 7032
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a2c0ad1c7fd3d2b953ab634ee284d737f50746da04fb49280c72364bfbfa0ec3
|
| 3 |
size 7032
|