FritzStack commited on
Commit
2e3eaba
·
verified ·
1 Parent(s): b58cd84

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -16
README.md CHANGED
@@ -12,28 +12,24 @@ language:
12
  - en
13
  ---
14
 
15
- # FritzStack/COGN-QWEN4B-4bit-mlx-4Bit
16
-
17
- The Model [FritzStack/COGN-QWEN4B-4bit-mlx-4Bit](https://huggingface.co/FritzStack/COGN-QWEN4B-4bit-mlx-4Bit) was converted to MLX format from [FritzStack/COGN-QWEN4B-4bit](https://huggingface.co/FritzStack/COGN-QWEN4B-4bit) using mlx-lm version **0.29.1**.
18
 
19
  ## Use with mlx
20
 
21
  ```bash
22
  pip install mlx-lm
 
23
  ```
24
 
25
- ```python
26
- from mlx_lm import load, generate
27
-
28
- model, tokenizer = load("FritzStack/COGN-QWEN4B-4bit-mlx-4Bit")
29
 
30
- prompt="hello"
31
-
32
- if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
33
- messages = [{"role": "user", "content": prompt}]
34
- prompt = tokenizer.apply_chat_template(
35
- messages, tokenize=False, add_generation_prompt=True
36
- )
37
-
38
- response = generate(model, tokenizer, prompt=prompt, verbose=True)
 
 
39
  ```
 
12
  - en
13
  ---
14
 
 
 
 
15
 
16
  ## Use with mlx
17
 
18
  ```bash
19
  pip install mlx-lm
20
+ !pip install git+https://github.com/Fede-stack/TONYpy.git
21
  ```
22
 
 
 
 
 
23
 
24
+ ```python
25
+ from TONY.COGNITIVE import CognitivePredictor, CognitivePredictor_mlx
26
+
27
+ text = 'I keep thinking about how I messed up in college. I should have studied harder and done more with my life.'
28
+ cogn = CognitivePredictor_mlx(model_name='FritzStack/COGN-QWEN4B-4bit-mlx-Q4')
29
+ cogn.predict_cognitive(text)
30
+ # Output:
31
+ # Attention Bias: Negative
32
+ # Interpretation Bias: Negative
33
+ # Memory Bias: Negative
34
+ # Rumination: Brooding
35
  ```