Text Generation
Transformers
PyTorch
Safetensors
English
mistral
physics
cosmology
conversational
text-generation-inference
Instructions to use Tijmen2/cosmosage_v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tijmen2/cosmosage_v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Tijmen2/cosmosage_v2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Tijmen2/cosmosage_v2") model = AutoModelForCausalLM.from_pretrained("Tijmen2/cosmosage_v2") 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 Tijmen2/cosmosage_v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Tijmen2/cosmosage_v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Tijmen2/cosmosage_v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Tijmen2/cosmosage_v2
- SGLang
How to use Tijmen2/cosmosage_v2 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 "Tijmen2/cosmosage_v2" \ --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": "Tijmen2/cosmosage_v2", "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 "Tijmen2/cosmosage_v2" \ --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": "Tijmen2/cosmosage_v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Tijmen2/cosmosage_v2 with Docker Model Runner:
docker model run hf.co/Tijmen2/cosmosage_v2
Adding Evaluation Results
#2
by leaderboard-pr-bot - opened
README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
| 2 |
tags:
|
| 3 |
- physics
|
| 4 |
- cosmology
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
model-index:
|
| 6 |
- name: cosmosage_qa
|
| 7 |
results: []
|
| 8 |
-
license: mit
|
| 9 |
-
language:
|
| 10 |
-
- en
|
| 11 |
-
pipeline_tag: text-generation
|
| 12 |
-
base_model: mistralai/Mistral-7B-v0.1
|
| 13 |
-
datasets:
|
| 14 |
-
- teknium/OpenHermes-2.5
|
| 15 |
---
|
| 16 |
|
| 17 |
# cosmosage
|
|
@@ -182,3 +182,17 @@ unusual instruction format:
|
|
| 182 |
> If matter-radiation equality occurs later in the history of the universe, then the photons spend more time in the diffusive state, which results in more damping of the CMB power spectrum. This is because the longer the photons spend in the diffusive state, the more time they have to lose energy through scattering with free electrons. Conversely, if matter-radiation equality occurs earlier in the history of the universe, then the photons spend less time in the diffusive state, which results in less damping of the CMB power spectrum.
|
| 183 |
>
|
| 184 |
> In summary, the time of matter-radiation equality affects the damping tail of the CMB power spectrum by influencing the amount of time that photons spend in the diffusive state before they are able to decouple from the matter and travel freely through the universe. The longer the photons spend in the diffusive state, the more damping occurs, and the earlier matter-radiation equality occurs, the less damping occurs.>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: mit
|
| 5 |
tags:
|
| 6 |
- physics
|
| 7 |
- cosmology
|
| 8 |
+
datasets:
|
| 9 |
+
- teknium/OpenHermes-2.5
|
| 10 |
+
pipeline_tag: text-generation
|
| 11 |
+
base_model: mistralai/Mistral-7B-v0.1
|
| 12 |
model-index:
|
| 13 |
- name: cosmosage_qa
|
| 14 |
results: []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
|
| 17 |
# cosmosage
|
|
|
|
| 182 |
> If matter-radiation equality occurs later in the history of the universe, then the photons spend more time in the diffusive state, which results in more damping of the CMB power spectrum. This is because the longer the photons spend in the diffusive state, the more time they have to lose energy through scattering with free electrons. Conversely, if matter-radiation equality occurs earlier in the history of the universe, then the photons spend less time in the diffusive state, which results in less damping of the CMB power spectrum.
|
| 183 |
>
|
| 184 |
> In summary, the time of matter-radiation equality affects the damping tail of the CMB power spectrum by influencing the amount of time that photons spend in the diffusive state before they are able to decouple from the matter and travel freely through the universe. The longer the photons spend in the diffusive state, the more damping occurs, and the earlier matter-radiation equality occurs, the less damping occurs.>
|
| 185 |
+
|
| 186 |
+
# [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
|
| 187 |
+
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_Tijmen2__cosmosage_v2)
|
| 188 |
+
|
| 189 |
+
| Metric |Value|
|
| 190 |
+
|---------------------------------|----:|
|
| 191 |
+
|Avg. |60.66|
|
| 192 |
+
|AI2 Reasoning Challenge (25-Shot)|59.73|
|
| 193 |
+
|HellaSwag (10-Shot) |80.90|
|
| 194 |
+
|MMLU (5-Shot) |59.57|
|
| 195 |
+
|TruthfulQA (0-shot) |50.98|
|
| 196 |
+
|Winogrande (5-shot) |75.93|
|
| 197 |
+
|GSM8k (5-shot) |36.85|
|
| 198 |
+
|