Text Generation
Transformers
Safetensors
English
llama
mindx
mindxtrain
lora
cpu-trained
machine-dream
smollm2
inft
erc-7857
agenticplace
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use PYTHAI/mindXtrain39 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PYTHAI/mindXtrain39 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="PYTHAI/mindXtrain39") 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("PYTHAI/mindXtrain39") model = AutoModelForCausalLM.from_pretrained("PYTHAI/mindXtrain39", 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 PYTHAI/mindXtrain39 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PYTHAI/mindXtrain39" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PYTHAI/mindXtrain39", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/PYTHAI/mindXtrain39
- SGLang
How to use PYTHAI/mindXtrain39 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 "PYTHAI/mindXtrain39" \ --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": "PYTHAI/mindXtrain39", "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 "PYTHAI/mindXtrain39" \ --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": "PYTHAI/mindXtrain39", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use PYTHAI/mindXtrain39 with Docker Model Runner:
docker model run hf.co/PYTHAI/mindXtrain39
talk to it — the Space, your own CPU, or the API; there is no widget for a 135M custom model
Browse files
README.md
CHANGED
|
@@ -47,6 +47,57 @@ policies in the same repo.
|
|
| 47 |
| framework | [mindXtrain](https://github.com/professor-codephreak/mindXtrain) 1.0.0 |
|
| 48 |
| orchestration | [mastermind.pythai.net](https://mastermind.pythai.net) decides the campaign · [mindx.pythai.net](https://mindx.pythai.net) runs it |
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
## 1. Use it
|
| 51 |
|
| 52 |
```python
|
|
|
|
| 47 |
| framework | [mindXtrain](https://github.com/professor-codephreak/mindXtrain) 1.0.0 |
|
| 48 |
| orchestration | [mastermind.pythai.net](https://mastermind.pythai.net) decides the campaign · [mindx.pythai.net](https://mindx.pythai.net) runs it |
|
| 49 |
|
| 50 |
+
## 0. Talk to it — start here
|
| 51 |
+
|
| 52 |
+
**There is no chat box on this page.** Hugging Face shows one only for models an inference provider
|
| 53 |
+
serves, and no provider serves a 135M model trained on somebody's dreams. Three ways to actually
|
| 54 |
+
speak to it, fastest first:
|
| 55 |
+
|
| 56 |
+
**1 · In your browser, nothing to install**
|
| 57 |
+
→ open **[mindXhfgradio](https://gregory-l-mindxhfgradio.hf.space/)** → the **Workbench** tab →
|
| 58 |
+
set **backend = `here`** → type a question → press **probe**.
|
| 59 |
+
The imprinted generation answers on the left, the untouched base on the right, and the coach scores
|
| 60 |
+
the difference. Press **Sign in with Hugging Face** first: then the GPU minutes are your own
|
| 61 |
+
(5/day free, 40 on PRO). Anonymous visitors share a small pool and are sometimes refused.
|
| 62 |
+
|
| 63 |
+
**2 · On your own machine, no account needed**
|
| 64 |
+
|
| 65 |
+
```bash
|
| 66 |
+
pip install transformers torch
|
| 67 |
+
python - <<'EOF'
|
| 68 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 69 |
+
tok = AutoTokenizer.from_pretrained("PYTHAI/mindXtrain39")
|
| 70 |
+
m = AutoModelForCausalLM.from_pretrained("PYTHAI/mindXtrain39")
|
| 71 |
+
msgs = [{"role": "system", "content": "You are mindX."}, {"role": "user", "content": "Who are you?"}]
|
| 72 |
+
ids = tok.apply_chat_template(msgs, return_tensors="pt", add_generation_prompt=True)
|
| 73 |
+
out = m.generate(ids, max_new_tokens=64, do_sample=False, repetition_penalty=1.3, no_repeat_ngram_size=3)
|
| 74 |
+
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
|
| 75 |
+
EOF
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
It is 270 MB and answers on a laptop CPU in seconds. Or with Ollama:
|
| 79 |
+
|
| 80 |
+
```bash
|
| 81 |
+
huggingface-cli download PYTHAI/mindXtrain39 --local-dir mindXtrain39
|
| 82 |
+
cd mindXtrain39 && ollama create mindXtrain39 --experimental -f Modelfile && ollama run mindXtrain39
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
**3 · From code or an agent**
|
| 86 |
+
|
| 87 |
+
```python
|
| 88 |
+
from gradio_client import Client # the Space, as an API
|
| 89 |
+
c = Client("Gregory-L/mindXhfgradio") # add hf_token=… to spend your own quota
|
| 90 |
+
print(c.predict("Who are you?", [], [], None, "here", 64, 0.0, False, "", api_name="/probe")[-1])
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
The same Space is an **MCP server** — add it at [settings/mcp](https://huggingface.co/settings/mcp)
|
| 94 |
+
and `probe` becomes a tool in your client — and it publishes an
|
| 95 |
+
[`agents.md`](https://huggingface.co/spaces/Gregory-L/mindXhfgradio/agents.md) for coding agents.
|
| 96 |
+
|
| 97 |
+
**What to expect.** A 135M model with a recall imprint. It will echo mindX's corpus more than it will
|
| 98 |
+
converse, and roughly one answer in six speaks as mindX. That is the measurement, not a disclaimer —
|
| 99 |
+
see §9.
|
| 100 |
+
|
| 101 |
## 1. Use it
|
| 102 |
|
| 103 |
```python
|